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

Unified Diff: src/gpu/GrClipMaskManager.h

Issue 1431593006: Fix mixed samples stencil clip (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 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/GrCaps.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrClipMaskManager.h
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
index 98fd3af351c355c5f0116f11790c635c7e8e11ae..a0d742769ca9a4fca81dfaaea8b3c01eb2e53106 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -33,13 +33,23 @@ class SkPath;
*/
class GrAppliedClip : public SkNoncopyable {
public:
- GrAppliedClip() {}
+ GrAppliedClip() : fIsCoCenteredMultisampledDraw(false) {}
+
const GrFragmentProcessor* clipCoverageFragmentProcessor() const { return fClipCoverageFP; }
const GrScissorState& scissorState() const { return fScissorState; }
+ /**
+ * This is used to perform a multisampled clip test when the draw requires MSAA to be disabled.
+ * It will allow the stencil test to run multisampled by turning on hardware MSAA, but co-locate
+ * the draw's samples at pixel center so it will still feel like MSAA is disabled.
+ */
+ bool isCoCenteredMultisampledDraw() const { return fIsCoCenteredMultisampledDraw; }
+
private:
SkAutoTUnref<const GrFragmentProcessor> fClipCoverageFP;
GrScissorState fScissorState;
+ bool fIsCoCenteredMultisampledDraw;
+
friend class GrClipMaskManager;
typedef SkNoncopyable INHERITED;
« no previous file with comments | « src/gpu/GrCaps.cpp ('k') | src/gpu/GrClipMaskManager.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698