1 /* 2 * Copyright 2016 Google Inc. 3 * 4 * Use of this source code is governed by a BSD-style license that can be 5 * found in the LICENSE file. 6 */ 7 8 #ifndef SkClipOp_DEFINED 9 #define SkClipOp_DEFINED 10 11 #include "include/core/SkTypes.h" 12 13 enum class SkClipOp { 14 kDifference = 0, 15 kIntersect = 1, 16 17 #ifdef SK_SUPPORT_DEPRECATED_CLIPOPS 18 kUnion_deprecated = 2, 19 kXOR_deprecated = 3, 20 kReverseDifference_deprecated = 4, 21 kReplace_deprecated = 5, 22 23 // Used internally for validation, can only shrink to 1 when the deprecated flag is gone 24 kMax_EnumValue = 5, 25 #else 26 // Technically only kDifference and kIntersect are allowed, hence kMax_EnumValue = 1, but 27 // internally we need these values defined for the deprecated clip ops. 28 kExtraEnumNeedInternallyPleaseIgnoreWillGoAway2 = 2, 29 kExtraEnumNeedInternallyPleaseIgnoreWillGoAway3 = 3, 30 kExtraEnumNeedInternallyPleaseIgnoreWillGoAway4 = 4, 31 kExtraEnumNeedInternallyPleaseIgnoreWillGoAway5 = 5, 32 33 kMax_EnumValue = 1 34 #endif 35 36 }; 37 38 #endif 39