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

Unified Diff: include/gpu/GrClip.h

Issue 2251573002: Implement difference clip rects with window rectangles (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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: include/gpu/GrClip.h
diff --git a/include/gpu/GrClip.h b/include/gpu/GrClip.h
index a6a0a665bdca0174f5937bca753eb662a9a7ee34..26a88b3b7e403eaa6c18bda55f7b15d55556ab63 100644
--- a/include/gpu/GrClip.h
+++ b/include/gpu/GrClip.h
@@ -10,6 +10,7 @@
#include "GrFragmentProcessor.h"
#include "GrTypesPriv.h"
+#include "GrWindowRectangles.h"
class GrDrawContext;
@@ -25,6 +26,7 @@ public:
}
const GrScissorState& scissorState() const { return fScissorState; }
+ const GrWindowRectangles& windows() const { return fWindows; }
GrFragmentProcessor* clipCoverageFragmentProcessor() const { return fClipCoverageFP.get(); }
bool hasStencilClip() const { return fHasStencilClip; }
@@ -35,6 +37,14 @@ public:
return fScissorState.intersect(irect) && fClippedDrawBounds.intersect(SkRect::Make(irect));
}
+ /**
+ * Adds an exclusive window rectangle to the clip. It is not currently supported to switch the
+ * windows to inclusive mode.
+ */
+ void addWindowRectangle(const SkIRect& window, const GrCaps& caps) {
+ fWindows.addWindow(window, caps);
+ }
+
void addCoverageFP(sk_sp<GrFragmentProcessor> fp) {
SkASSERT(!fClipCoverageFP);
fClipCoverageFP = fp;
@@ -53,6 +63,7 @@ public:
private:
GrScissorState fScissorState;
+ GrWindowRectangles fWindows;
sk_sp<GrFragmentProcessor> fClipCoverageFP;
bool fHasStencilClip;
SkRect fClippedDrawBounds;
« no previous file with comments | « gyp/gpu.gypi ('k') | src/gpu/GrClipStackClip.cpp » ('j') | src/gpu/GrClipStackClip.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698