Hide exotic clipops, with a private rename for internal use
BUG=skia:
Change-Id: I6c320a8c7fa501771d93c191c4657452cc9f2e03
Reviewed-on: https://skia-review.googlesource.com/5844
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
diff --git a/gn/android_framework_defines.gni b/gn/android_framework_defines.gni
index 40ac342..56b3308 100644
--- a/gn/android_framework_defines.gni
+++ b/gn/android_framework_defines.gni
@@ -16,5 +16,6 @@
"SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS",
"SK_SUPPORT_LEGACY_SHADER_ISABITMAP",
"SK_SUPPORT_LEGACY_EMBOSSMASKFILTER",
+ "SK_SUPPORT_EXOTIC_CLIPOPS",
"SK_SUPPORT_LEGACY_CLIPOPS_PLAIN_ENUM",
]
diff --git a/include/core/SkClipOp.h b/include/core/SkClipOp.h
index 4a69ef2..45e0044 100644
--- a/include/core/SkClipOp.h
+++ b/include/core/SkClipOp.h
@@ -34,10 +34,49 @@
// Goal: remove these, since they can grow the current clip
+#ifdef SK_SUPPORT_EXOTIC_CLIPOPS
kUnion = 2,
kXOR = 3,
kReverseDifference = 4,
kReplace = 5,
+#endif
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // End of enum
+
+
+
+
+
+
+
+
+
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // Nothing to see here
+
+
+
+
+
+
+
+
+
+ ////////////////////////////////////////////////////////////////////////////////
+ // Turn back!
+
+
+
+
+
+ // Private Internal enums -- do not use -- destined to be removed at any moment!
+
+ kUnion_private_internal_do_not_use = 2,
+ kXOR_private_internal_do_not_use = 3,
+ kReverseDifference_private_internal_do_not_use = 4,
+ kReplace_private_internal_do_not_use = 5,
};
#endif
diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h
index 64f4626..d30bbcc 100644
--- a/include/core/SkClipStack.h
+++ b/include/core/SkClipStack.h
@@ -22,7 +22,7 @@
#ifdef SK_SUPPORT_LEGACY_CLIPOPS_PLAIN_ENUM
#define SkClipStackImpl_ReplaceOp kReplace_SkClipOp
#else
- #define SkClipStackImpl_ReplaceOp SkClipOp::kReplace
+ #define SkClipStackImpl_ReplaceOp SkClipOp::kReplace_private_internal_do_not_use
#endif
// Because a single save/restore state can have multiple clips, this class
diff --git a/public.bzl b/public.bzl
index 147f11b..5cbfc9f 100644
--- a/public.bzl
+++ b/public.bzl
@@ -593,6 +593,7 @@
"SK_SUPPORT_LEGACY_IMAGE_ENCODER_CLASS",
# Temporarily Disable analytic AA for Google3
"SK_NO_ANALYTIC_AA",
+ "SK_SUPPORT_EXOTIC_CLIPOPS",
"SK_SUPPORT_LEGACY_CLIPOPS_PLAIN_ENUM",
"SK_SUPPORT_LEGACY_BITMAP_SETPIXELREF",
]
diff --git a/src/core/SkClipOpPriv.h b/src/core/SkClipOpPriv.h
index 5de8449..00fb5ba 100644
--- a/src/core/SkClipOpPriv.h
+++ b/src/core/SkClipOpPriv.h
@@ -13,10 +13,11 @@
#ifndef SK_SUPPORT_LEGACY_CLIPOPS_PLAIN_ENUM
const SkClipOp kDifference_SkClipOp = SkClipOp::kDifference;
const SkClipOp kIntersect_SkClipOp = SkClipOp::kIntersect;
-const SkClipOp kUnion_SkClipOp = SkClipOp::kUnion;
-const SkClipOp kXOR_SkClipOp = SkClipOp::kXOR;
-const SkClipOp kReverseDifference_SkClipOp = SkClipOp::kReverseDifference;
-const SkClipOp kReplace_SkClipOp = SkClipOp::kReplace;
+
+const SkClipOp kUnion_SkClipOp = SkClipOp::kUnion_private_internal_do_not_use;
+const SkClipOp kXOR_SkClipOp = SkClipOp::kXOR_private_internal_do_not_use;
+const SkClipOp kReverseDifference_SkClipOp = SkClipOp::kReverseDifference_private_internal_do_not_use;
+const SkClipOp kReplace_SkClipOp = SkClipOp::kReplace_private_internal_do_not_use;
#endif
#endif