Index: src/gpu/GrGpu.h |
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h |
index 34b417cb13f36907bb80249aac384b4b62c8ad7e..de90b4d06136593bbbce54539eb9eb7e31cd1c5a 100644 |
--- a/src/gpu/GrGpu.h |
+++ b/src/gpu/GrGpu.h |
@@ -22,7 +22,7 @@ class GrPathRendererChain; |
class GrStencilBuffer; |
class GrVertexBufferAllocPool; |
-class GrGpu : public GrDrawTarget { |
+class GrGpu : public GrClipTarget { |
public: |
/** |
@@ -271,6 +271,10 @@ public: |
bool canIgnoreRect, |
GrRenderTarget* renderTarget = NULL) SK_OVERRIDE; |
+ virtual void clearStencilClip(const SkIRect& rect, |
+ bool insideClip, |
+ GrRenderTarget* renderTarget = NULL) SK_OVERRIDE; |
+ |
virtual void purgeResources() SK_OVERRIDE { |
// The clip mask manager can rebuild all its clip masks so just |
// get rid of them all. |
@@ -294,11 +298,6 @@ public: |
return fResetTimestamp; |
} |
- // GrGpu subclass sets clip bit in the stencil buffer. The subclass is |
- // free to clear the remaining bits to zero if masked clears are more |
- // expensive than clearing all bits. |
- virtual void clearStencilClip(GrRenderTarget*, const SkIRect& rect, bool insideClip) = 0; |
- |
enum PrivateDrawStateStateBits { |
kFirstBit = (GrDrawState::kLastPublicStateBit << 1), |
@@ -415,6 +414,13 @@ private: |
virtual void onClear(GrRenderTarget*, const SkIRect* rect, GrColor color, |
bool canIgnoreRect) = 0; |
+ |
+ // Overridden by backend specific classes to perform a clear of the stencil clip bits. This is |
+ // ONLY used by the clip mask manager |
bsalomon
2014/10/29 14:46:51
can we say only used by ClipTarget? I think we sho
|
+ virtual void onClearStencilClip(GrRenderTarget*, |
+ const SkIRect& rect, |
+ bool insideClip) = 0; |
+ |
// overridden by backend-specific derived class to perform the draw call. |
virtual void onGpuDraw(const DrawInfo&) = 0; |
@@ -447,7 +453,7 @@ private: |
// backend-specific flush of the state. |
// returns false if current state is unsupported. |
virtual bool flushGraphicsState(DrawType, |
- const ScissorState&, |
+ const GrClipMaskManager::ScissorState&, |
const GrDeviceCoordTexture* dstCopy) = 0; |
// clears target's entire stencil buffer to 0 |
@@ -500,7 +506,7 @@ private: |
// these are mutable so they can be created on-demand |
mutable GrIndexBuffer* fQuadIndexBuffer; |
- typedef GrDrawTarget INHERITED; |
+ typedef GrClipTarget INHERITED; |
}; |
#endif |