Don't allow renderTarget==NULL to GrContext::clear() and friends.
Review URL: https://codereview.chromium.org/680413005
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 2f4f0a6..f7b9537 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -198,13 +198,7 @@
GrColor color,
bool canIgnoreRect,
GrRenderTarget* renderTarget) {
- if (NULL == renderTarget) {
- renderTarget = this->getDrawState().getRenderTarget();
- }
- if (NULL == renderTarget) {
- SkASSERT(0);
- return;
- }
+ SkASSERT(renderTarget);
this->handleDirtyContext();
this->onClear(renderTarget, rect, color, canIgnoreRect);
}