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

Unified Diff: include/core/SkCanvas.h

Issue 190723004: flag to make kClipToLayer_SaveFlag the default behavior (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: officially ignore the gm that was exercising this (now removed) feature Created 6 years, 9 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
« no previous file with comments | « gm/canvasstate.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkCanvas.h
diff --git a/include/core/SkCanvas.h b/include/core/SkCanvas.h
index 093185c940400eaf1aa31fce2579665dee82e46d..773df89d789843ee4ef5b042403c57136afb94e6 100644
--- a/include/core/SkCanvas.h
+++ b/include/core/SkCanvas.h
@@ -18,6 +18,10 @@
#include "SkRegion.h"
#include "SkXfermode.h"
+// if not defined, we always assume ClipToLayer for saveLayer()
+//#define SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
+
+
//#define SK_SUPPORT_LEGACY_WRITEPIXELSCONFIG
//#define SK_SUPPORT_LEGACY_GETCLIPTYPE
//#define SK_SUPPORT_LEGACY_GETTOTALCLIP
@@ -325,12 +329,18 @@ public:
kHasAlphaLayer_SaveFlag = 0x04,
/** the layer needs to support 8-bits per color component */
kFullColorLayer_SaveFlag = 0x08,
- /** the layer should clip against the bounds argument */
+ /**
+ * the layer should clip against the bounds argument
+ *
+ * if SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG is undefined, this is treated as always on.
+ */
kClipToLayer_SaveFlag = 0x10,
// helper masks for common choices
kMatrixClip_SaveFlag = 0x03,
+#ifdef SK_SUPPORT_LEGACY_CLIPTOLAYERFLAG
kARGB_NoClipLayer_SaveFlag = 0x0F,
+#endif
kARGB_ClipLayer_SaveFlag = 0x1F
};
« no previous file with comments | « gm/canvasstate.cpp ('k') | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698