diff options
author | 2015-06-24 08:05:52 -0700 | |
---|---|---|
committer | 2015-06-24 08:05:52 -0700 | |
commit | ba9a4aa8550c982c480d03cb6ba2cabaf6209b41 (patch) | |
tree | ed41c4cda889e23a1733c0d16d8a43e9d71620c1 | |
parent | cba99b88fd5fb39def7a094dc32c0745c7a1cfea (diff) |
Revert of remove SK_SUPPORT_LEGACY_PATHOP_ENUMS (patchset #1 id:1 of https://codereview.chromium.org/1200323005/)
Reason for revert:
Breaking the Android build.
Original issue's description:
> remove SK_SUPPORT_LEGACY_PATHOP_ENUMS
>
> BUG=skia:
> TBR=
>
> Committed: https://skia.googlesource.com/skia/+/8bcc7a00febd737f7e82513bd5e4a697526626de
TBR=reed@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1203983003
-rw-r--r-- | include/pathops/SkPathOps.h | 13 | ||||
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 12 |
2 files changed, 19 insertions, 6 deletions
diff --git a/include/pathops/SkPathOps.h b/include/pathops/SkPathOps.h index 047588b635..a729e6f124 100644 --- a/include/pathops/SkPathOps.h +++ b/include/pathops/SkPathOps.h @@ -15,6 +15,11 @@ class SkPath; struct SkRect; +// FIXME: remove this once the define in src/skia/SkUserConfig.h lands +#ifndef SK_SUPPORT_LEGACY_PATHOP_ENUMS +#define SK_SUPPORT_LEGACY_PATHOP_ENUMS +#endif + // FIXME: move everything below into the SkPath class /** * The logical operations that can be performed when combining two paths. @@ -25,6 +30,14 @@ enum SkPathOp { kUnion_SkPathOp, //!< union (inclusive-or) the two paths kXOR_SkPathOp, //!< exclusive-or the two paths kReverseDifference_SkPathOp, //!< subtract the first path from the op path + +#ifdef SK_SUPPORT_LEGACY_PATHOP_ENUMS + kDifference_PathOp = 0, //!< subtract the op path from the first path + kIntersect_PathOp, //!< intersect the two paths + kUnion_PathOp, //!< union (inclusive-or) the two paths + kXOR_PathOp, //!< exclusive-or the two paths + kReverseDifference_PathOp, //!< subtract the first path from the op path +#endif }; /** Set this path to the result of applying the Op to this path and the diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index d044900ae3..6d946125e1 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -345,7 +345,7 @@ static bool calculate_inverse_path(const SkRect& bounds, const SkPath& invPath, SkPath clipPath; clipPath.addRect(bounds); - return Op(clipPath, invPath, kIntersect_SkPathOp, outPath); + return Op(clipPath, invPath, kIntersect_PathOp, outPath); } #ifdef SK_PDF_USE_PATHOPS_CLIPPING @@ -353,16 +353,16 @@ static bool calculate_inverse_path(const SkRect& bounds, const SkPath& invPath, // enums so region_op_to_pathops_op can do a straight passthrough cast. // If these are failing, it may be necessary to make region_op_to_pathops_op // do more. -SK_COMPILE_ASSERT(SkRegion::kDifference_Op == (int)kDifference_SkPathOp, +SK_COMPILE_ASSERT(SkRegion::kDifference_Op == (int)kDifference_PathOp, region_pathop_mismatch); -SK_COMPILE_ASSERT(SkRegion::kIntersect_Op == (int)kIntersect_SkPathOp, +SK_COMPILE_ASSERT(SkRegion::kIntersect_Op == (int)kIntersect_PathOp, region_pathop_mismatch); -SK_COMPILE_ASSERT(SkRegion::kUnion_Op == (int)kUnion_SkPathOp, +SK_COMPILE_ASSERT(SkRegion::kUnion_Op == (int)kUnion_PathOp, region_pathop_mismatch); -SK_COMPILE_ASSERT(SkRegion::kXOR_Op == (int)kXOR_SkPathOp, +SK_COMPILE_ASSERT(SkRegion::kXOR_Op == (int)kXOR_PathOp, region_pathop_mismatch); SK_COMPILE_ASSERT(SkRegion::kReverseDifference_Op == - (int)kReverseDifference_SkPathOp, + (int)kReverseDifference_PathOp, region_pathop_mismatch); static SkPathOp region_op_to_pathops_op(SkRegion::Op op) { |