aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkClipOp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/core/SkClipOp.h')
-rw-r--r--include/core/SkClipOp.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/include/core/SkClipOp.h b/include/core/SkClipOp.h
index 2e4fbbf868..4a69ef29d5 100644
--- a/include/core/SkClipOp.h
+++ b/include/core/SkClipOp.h
@@ -10,7 +10,10 @@
#include "SkTypes.h"
-// these kept in SkRegion::Op order for now ...
+// SkClipOp enum values always match the corresponding values in SkRegion::Op
+
+#ifdef SK_SUPPORT_LEGACY_CLIPOPS_PLAIN_ENUM
+
enum SkClipOp {
kDifference_SkClipOp = 0,
kIntersect_SkClipOp = 1,
@@ -23,4 +26,20 @@ enum SkClipOp {
kReplace_SkClipOp = 5,
};
+#else
+
+enum class SkClipOp {
+ kDifference = 0,
+ kIntersect = 1,
+
+ // Goal: remove these, since they can grow the current clip
+
+ kUnion = 2,
+ kXOR = 3,
+ kReverseDifference = 4,
+ kReplace = 5,
+};
+
+#endif
+
#endif