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

Unified Diff: src/gpu/GrClipMaskManager.cpp

Issue 913693002: Clean up clipping code a bit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix assert Created 5 years, 10 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/GrClipMaskManager.cpp
diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp
index 0226ac1b764076786112c3ad5acc279207969082..f69c8717f8e050521e0602ce10347e070eb8e14b 100644
--- a/src/gpu/GrClipMaskManager.cpp
+++ b/src/gpu/GrClipMaskManager.cpp
@@ -23,7 +23,6 @@
#include "effects/GrRRectEffect.h"
#include "effects/GrTextureDomain.h"
-#define GR_AA_CLIP 1
typedef SkClipStack::Element Element;
////////////////////////////////////////////////////////////////////////////////
@@ -153,7 +152,7 @@ bool GrClipMaskManager::installClipEffects(GrPipelineBuilder* pipelineBuilder,
if (!skip) {
GrPrimitiveEdgeType edgeType;
- if (GR_AA_CLIP && iter.get()->isAA()) {
+ if (iter.get()->isAA()) {
if (rt->isMultisampled()) {
// Coverage based AA clips don't place nicely with MSAA.
failed = true;
@@ -276,7 +275,6 @@ bool GrClipMaskManager::setupClipping(GrPipelineBuilder* pipelineBuilder,
}
}
-#if GR_AA_CLIP
// If MSAA is enabled we can do everything in the stencil buffer.
if (0 == rt->numSamples() && requiresAA) {
GrTexture* result = NULL;
@@ -314,7 +312,6 @@ bool GrClipMaskManager::setupClipping(GrPipelineBuilder* pipelineBuilder,
}
// if alpha clip mask creation fails fall through to the non-AA code paths
}
-#endif // GR_AA_CLIP
// Either a hard (stencil buffer) clip was explicitly requested or an anti-aliased clip couldn't
// be created. In either case, free up the texture in the anti-aliased mask cache.

Powered by Google App Engine
This is Rietveld 408576698