2016-09-20 15:42:38 +00:00
|
|
|
/*
|
|
|
|
* Copyright 2016 Google Inc.
|
|
|
|
*
|
|
|
|
* Use of this source code is governed by a BSD-style license that can be
|
|
|
|
* found in the LICENSE file.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef SkClipOp_DEFINED
|
|
|
|
#define SkClipOp_DEFINED
|
|
|
|
|
2019-04-23 17:05:21 +00:00
|
|
|
#include "include/core/SkTypes.h"
|
2016-09-20 15:42:38 +00:00
|
|
|
|
2016-12-12 15:02:12 +00:00
|
|
|
enum class SkClipOp {
|
|
|
|
kDifference = 0,
|
|
|
|
kIntersect = 1,
|
|
|
|
|
2017-05-10 18:13:20 +00:00
|
|
|
#ifdef SK_SUPPORT_DEPRECATED_CLIPOPS
|
2016-12-20 13:17:36 +00:00
|
|
|
kUnion_deprecated = 2,
|
|
|
|
kXOR_deprecated = 3,
|
|
|
|
kReverseDifference_deprecated = 4,
|
|
|
|
kReplace_deprecated = 5,
|
2020-09-28 14:33:42 +00:00
|
|
|
|
|
|
|
// Used internally for validation, can only shrink to 1 when the deprecated flag is gone
|
|
|
|
kMax_EnumValue = 5,
|
2017-05-10 18:13:20 +00:00
|
|
|
#else
|
2020-09-28 14:33:42 +00:00
|
|
|
// Technically only kDifference and kIntersect are allowed, hence kMax_EnumValue = 1, but
|
|
|
|
// internally we need these values defined for the deprecated clip ops.
|
2017-05-10 18:13:20 +00:00
|
|
|
kExtraEnumNeedInternallyPleaseIgnoreWillGoAway2 = 2,
|
|
|
|
kExtraEnumNeedInternallyPleaseIgnoreWillGoAway3 = 3,
|
|
|
|
kExtraEnumNeedInternallyPleaseIgnoreWillGoAway4 = 4,
|
|
|
|
kExtraEnumNeedInternallyPleaseIgnoreWillGoAway5 = 5,
|
2020-09-28 14:33:42 +00:00
|
|
|
|
|
|
|
kMax_EnumValue = 1
|
2017-05-10 18:13:20 +00:00
|
|
|
#endif
|
2016-12-20 13:17:36 +00:00
|
|
|
|
2016-12-12 15:02:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|