From 3711e1185d53aa70e56c28b5b6f74ab1590fd865 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Tue, 20 Dec 2016 08:17:36 -0500 Subject: [PATCH] switch to _deprecated suffix for exotic SkClipOps BUG=skia: Change-Id: Ibb0cd0f963c040d9033cd6bcb040c651bca99651 Reviewed-on: https://skia-review.googlesource.com/6206 Commit-Queue: Mike Reed Reviewed-by: Florin Malita --- include/core/SkClipOp.h | 16 +++++++++++----- include/core/SkClipStack.h | 6 +++--- public.bzl | 1 + src/core/SkClipOpPriv.h | 8 ++++---- 4 files changed, 19 insertions(+), 12 deletions(-) diff --git a/include/core/SkClipOp.h b/include/core/SkClipOp.h index 3035565c93..e49ea5bd2b 100644 --- a/include/core/SkClipOp.h +++ b/include/core/SkClipOp.h @@ -56,13 +56,19 @@ enum class SkClipOp { // Private Internal enums -- do not use -- destined to be removed at any moment! + kUnion_deprecated = 2, + kXOR_deprecated = 3, + kReverseDifference_deprecated = 4, + kReplace_deprecated = 5, - 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, + kMax_EnumValue = kReplace_deprecated, - kMax_EnumValue = kReplace_private_internal_do_not_use +#ifdef SK_SUPPORT_LEGACY_CLIPOP_EXOTIC_NAMES + kUnion_private_internal_do_not_use = kUnion_deprecated, + kXOR_private_internal_do_not_use = kXOR_deprecated, + kReverseDifference_private_internal_do_not_use = kReverseDifference_deprecated, + kReplace_private_internal_do_not_use = kReplace_deprecated, +#endif }; #endif diff --git a/include/core/SkClipStack.h b/include/core/SkClipStack.h index dce6904318..55e0942d96 100644 --- a/include/core/SkClipStack.h +++ b/include/core/SkClipStack.h @@ -54,7 +54,7 @@ public: static const int kTypeCnt = kLastType + 1; Element() { - this->initCommon(0, SkClipOp::kReplace_private_internal_do_not_use, false); + this->initCommon(0, SkClipOp::kReplace_deprecated, false); this->setEmpty(); } @@ -226,7 +226,7 @@ public: int fGenID; Element(int saveCount) { - this->initCommon(saveCount, SkClipOp::kReplace_private_internal_do_not_use, false); + this->initCommon(saveCount, SkClipOp::kReplace_deprecated, false); this->setEmpty(); } @@ -516,7 +516,7 @@ private: void restoreTo(int saveCount); inline bool hasClipRestriction(SkClipOp op) { - return op >= SkClipOp::kUnion_private_internal_do_not_use && !fClipRestrictionRect.isEmpty(); + return op >= SkClipOp::kUnion_deprecated && !fClipRestrictionRect.isEmpty(); } /** diff --git a/public.bzl b/public.bzl index 5c2e09f67d..a87d325d5d 100644 --- a/public.bzl +++ b/public.bzl @@ -594,6 +594,7 @@ DEFINES_ALL = [ # Temporarily Disable analytic AA for Google3 "SK_NO_ANALYTIC_AA", "SK_SUPPORT_LEGACY_BITMAP_SETPIXELREF", + "SK_SUPPORT_LEGACY_CLIPOP_EXOTIC_NAMES", ] ################################################################################ diff --git a/src/core/SkClipOpPriv.h b/src/core/SkClipOpPriv.h index 4af442ada9..21695b9042 100644 --- a/src/core/SkClipOpPriv.h +++ b/src/core/SkClipOpPriv.h @@ -13,9 +13,9 @@ const SkClipOp kDifference_SkClipOp = SkClipOp::kDifference; const SkClipOp kIntersect_SkClipOp = SkClipOp::kIntersect; -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; +const SkClipOp kUnion_SkClipOp = SkClipOp::kUnion_deprecated; +const SkClipOp kXOR_SkClipOp = SkClipOp::kXOR_deprecated; +const SkClipOp kReverseDifference_SkClipOp = SkClipOp::kReverseDifference_deprecated; +const SkClipOp kReplace_SkClipOp = SkClipOp::kReplace_deprecated; #endif