Chromium Code Reviews| Index: src/gpu/GrDrawTarget.h |
| diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h |
| index 92e99c6dd762f27127367aca6f632040c7c38d04..076b702ed45acaac1e29d08dea524803d32e209e 100644 |
| --- a/src/gpu/GrDrawTarget.h |
| +++ b/src/gpu/GrDrawTarget.h |
| @@ -505,6 +505,7 @@ public: |
| const GrDeviceCoordTexture* dstCopy) { |
| this->onDrawPaths(pathRange, indices, count, transforms, transformsType, fill, dstCopy); |
| } |
| + |
| //////////////////////////////////////////////////////////////////////////// |
| /** |
| @@ -943,7 +944,18 @@ private: |
| class GrClipTarget : public GrDrawTarget { |
|
bsalomon
2014/10/28 17:53:28
This class needs a comment about why it exists.
|
| public: |
| - GrClipTarget(GrContext* context) : INHERITED(context) {} |
| + GrClipTarget(GrContext* context) : INHERITED(context) { |
| + fClipMaskManager.setClipTarget(this); |
| + } |
| + |
| + void getPathStencilSettingsForFillType(SkPath::FillType, GrStencilSettings*); |
| + |
| + /* Clip mask manager needs access to the context. |
| + * TODO we only need a very small subset of context in the CMM. |
| + */ |
| + GrContext* getContext() { return INHERITED::getContext(); } |
| + const GrContext* getContext() const { return INHERITED::getContext(); } |
| + |
| /** |
| * Clip Mask Manager(and no one else) needs to clear private stencil bits. |
| * ClipTarget subclass sets clip bit in the stencil buffer. The subclass |
| @@ -952,6 +964,9 @@ public: |
| */ |
| virtual void clearStencilClip(const SkIRect& rect, bool insideClip, GrRenderTarget* = NULL) = 0; |
| +protected: |
| + GrClipMaskManager fClipMaskManager; |
| + |
| private: |
| typedef GrDrawTarget INHERITED; |
| }; |