Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(234)

Unified Diff: src/gpu/GrDrawTarget.h

Issue 683933003: Clip mask manager moved to ClipTarget (Closed) Base URL: https://skia.googlesource.com/skia.git@clear_stencil_clip_on_drawinfo
Patch Set: cleanup Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
};

Powered by Google App Engine
This is Rietveld 408576698