Move some work from backend onClear to base class clear
BUG=skia:
Review URL: https://codereview.chromium.org/1275543005
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index bb020f5..64016cf 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -216,13 +216,13 @@
return ib;
}
-void GrGpu::clear(const SkIRect* rect,
+void GrGpu::clear(const SkIRect& rect,
GrColor color,
- bool canIgnoreRect,
GrRenderTarget* renderTarget) {
SkASSERT(renderTarget);
+ SkASSERT(SkIRect::MakeWH(renderTarget->width(), renderTarget->height()).contains(rect));
this->handleDirtyContext();
- this->onClear(renderTarget, rect, color, canIgnoreRect);
+ this->onClear(renderTarget, rect, color);
}
void GrGpu::clearStencilClip(const SkIRect& rect,