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

Unified Diff: src/gpu/GrRenderTargetContextPriv.h

Issue 2468743002: TEMPORARY: track stencil clip state in GrRenderTargetOpList (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « src/gpu/GrClipStackClip.cpp ('k') | src/gpu/GrRenderTargetOpList.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrRenderTargetContextPriv.h
diff --git a/src/gpu/GrRenderTargetContextPriv.h b/src/gpu/GrRenderTargetContextPriv.h
index 092fd11c58b04b67dc6fee3e847ea77cc2591335..83a334b012dc06628e554603cfc3a47e98f9c9eb 100644
--- a/src/gpu/GrRenderTargetContextPriv.h
+++ b/src/gpu/GrRenderTargetContextPriv.h
@@ -25,6 +25,28 @@ public:
return fRenderTargetContext->getOpList()->instancedRendering();
}
+ // called to note the last clip drawn to the stencil buffer.
+ // TODO: remove after clipping overhaul.
+ void setLastClip(int32_t clipStackGenID,
+ const SkIRect& clipSpaceRect,
+ const SkIPoint clipOrigin) {
+ GrRenderTargetOpList* opList = fRenderTargetContext->getOpList();
+ opList->fLastClipStackGenID = clipStackGenID;
+ opList->fLastClipStackRect = clipSpaceRect;
+ opList->fLastClipOrigin = clipOrigin;
+ }
+
+ // called to determine if we have to render the clip into SB.
+ // TODO: remove after clipping overhaul.
+ bool mustRenderClip(int32_t clipStackGenID,
+ const SkIRect& clipSpaceRect,
+ const SkIPoint& clipOrigin) const {
+ GrRenderTargetOpList* opList = fRenderTargetContext->getOpList();
+ return opList->fLastClipStackGenID != clipStackGenID ||
+ opList->fLastClipOrigin != clipOrigin ||
+ !opList->fLastClipStackRect.contains(clipSpaceRect);
+ }
+
void clear(const GrFixedClip&, const GrColor, bool canIgnoreClip);
void clearStencilClip(const GrFixedClip&, bool insideStencilMask);
« no previous file with comments | « src/gpu/GrClipStackClip.cpp ('k') | src/gpu/GrRenderTargetOpList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698