clear stencil clip on draw target
TBR=
BUG=skia:
Review URL: https://codereview.chromium.org/683673002
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 7e8c4c8..e767d07 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -28,7 +28,7 @@
#define DEBUG_INVAL_START_IDX -1
GrGpu::GrGpu(GrContext* context)
- : GrDrawTarget(context)
+ : INHERITED(context)
, fResetTimestamp(kExpiredTimestamp+1)
, fResetBits(kAll_GrBackendState)
, fVertexPool(NULL)
@@ -212,6 +212,20 @@
this->onClear(renderTarget, rect, color, canIgnoreRect);
}
+void GrGpu::clearStencilClip(const SkIRect& rect,
+ bool insideClip,
+ GrRenderTarget* renderTarget) {
+ if (NULL == renderTarget) {
+ renderTarget = this->getDrawState().getRenderTarget();
+ }
+ if (NULL == renderTarget) {
+ SkASSERT(0);
+ return;
+ }
+ this->handleDirtyContext();
+ this->onClearStencilClip(renderTarget, rect, insideClip);
+}
+
bool GrGpu::readPixels(GrRenderTarget* target,
int left, int top, int width, int height,
GrPixelConfig config, void* buffer,
@@ -302,7 +316,7 @@
const GrDeviceCoordTexture* dstCopy,
const SkRect* devBounds,
GrDrawState::AutoRestoreEffects* are) {
- ScissorState scissorState;
+ GrClipMaskManager::ScissorState scissorState;
GrDrawState::AutoRestoreStencil ars;
if (!fClipMaskManager.setupClipping(this->getClip(),
devBounds,