remove SK_SUPPORT_LEGACY_PATHOP_ENUMS
authorreed <reed@google.com>
Wed, 24 Jun 2015 05:05:19 +0000 (22:05 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 24 Jun 2015 05:05:19 +0000 (22:05 -0700)
BUG=skia:
TBR=

Review URL: https://codereview.chromium.org/1200323005

include/pathops/SkPathOps.h
src/pdf/SkPDFDevice.cpp

index a729e6f..047588b 100644 (file)
@@ -15,11 +15,6 @@ 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.
@@ -30,14 +25,6 @@ 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
index 6d94612..d044900 100644 (file)
@@ -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_PathOp, outPath);
+    return Op(clipPath, invPath, kIntersect_SkPathOp, 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_PathOp,
+SK_COMPILE_ASSERT(SkRegion::kDifference_Op == (int)kDifference_SkPathOp,
                   region_pathop_mismatch);
-SK_COMPILE_ASSERT(SkRegion::kIntersect_Op == (int)kIntersect_PathOp,
+SK_COMPILE_ASSERT(SkRegion::kIntersect_Op == (int)kIntersect_SkPathOp,
                   region_pathop_mismatch);
-SK_COMPILE_ASSERT(SkRegion::kUnion_Op == (int)kUnion_PathOp,
+SK_COMPILE_ASSERT(SkRegion::kUnion_Op == (int)kUnion_SkPathOp,
                   region_pathop_mismatch);
-SK_COMPILE_ASSERT(SkRegion::kXOR_Op == (int)kXOR_PathOp,
+SK_COMPILE_ASSERT(SkRegion::kXOR_Op == (int)kXOR_SkPathOp,
                   region_pathop_mismatch);
 SK_COMPILE_ASSERT(SkRegion::kReverseDifference_Op ==
-                  (int)kReverseDifference_PathOp,
+                  (int)kReverseDifference_SkPathOp,
                   region_pathop_mismatch);
 
 static SkPathOp region_op_to_pathops_op(SkRegion::Op op) {