Revert "add guard to switch to SkPathTypes"

This reverts commit e1af44498b6e40c448811e6efc4412272cc10ca7.

Reason for revert: breaking google3?

Original change's description:
> add guard to switch to SkPathTypes
> 
> Change-Id: I44d8b5ae8a5172d11a6d4cd9d994373dd3816d6f
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241278
> Reviewed-by: Kevin Lubick <kjlubick@google.com>
> Reviewed-by: Florin Malita <fmalita@chromium.org>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=robertphillips@google.com,kjlubick@google.com,fmalita@chromium.org,reed@google.com

Change-Id: If1fffb6310921ee6f213af000da793afcf62ab0b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/241560
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/src/gpu/GrDistanceFieldGenFromVector.cpp b/src/gpu/GrDistanceFieldGenFromVector.cpp
index fc505e5..29aa16d 100644
--- a/src/gpu/GrDistanceFieldGenFromVector.cpp
+++ b/src/gpu/GrDistanceFieldGenFromVector.cpp
@@ -763,7 +763,7 @@
         workingPath = path;
     }
 
-    if (!IsDistanceFieldSupportedFillType((SkPathFillType)workingPath.getFillType())) {
+    if (!IsDistanceFieldSupportedFillType(workingPath.getFillType())) {
         return false;
     }
 
@@ -829,19 +829,15 @@
                 kOutside = 1
             } dfSign;
 
-            switch ((SkPathFillType)workingPath.getFillType()) {
-                case SkPathFillType::kWinding:
-                    dfSign = windingNumber ? kInside : kOutside;
-                    break;
-                case SkPathFillType::kInverseWinding:
-                    dfSign = windingNumber ? kOutside : kInside;
-                    break;
-                case SkPathFillType::kEvenOdd:
-                    dfSign = (windingNumber % 2) ? kInside : kOutside;
-                    break;
-                case SkPathFillType::kInverseEvenOdd:
-                    dfSign = (windingNumber % 2) ? kOutside : kInside;
-                    break;
+            if (workingPath.getFillType() == SkPath::kWinding_FillType) {
+                dfSign = windingNumber ? kInside : kOutside;
+            } else if (workingPath.getFillType() == SkPath::kInverseWinding_FillType) {
+                dfSign = windingNumber ? kOutside : kInside;
+            } else if (workingPath.getFillType() == SkPath::kEvenOdd_FillType) {
+                dfSign = (windingNumber % 2) ? kInside : kOutside;
+            } else {
+                SkASSERT(workingPath.getFillType() == SkPath::kInverseEvenOdd_FillType);
+                dfSign = (windingNumber % 2) ? kOutside : kInside;
             }
 
             // The winding number at the end of a scanline should be zero.
diff --git a/src/gpu/GrDistanceFieldGenFromVector.h b/src/gpu/GrDistanceFieldGenFromVector.h
index 0362166..8e8d1b3 100644
--- a/src/gpu/GrDistanceFieldGenFromVector.h
+++ b/src/gpu/GrDistanceFieldGenFromVector.h
@@ -30,10 +30,10 @@
                                      const SkPath& path, const SkMatrix& viewMatrix,
                                      int width, int height, size_t rowBytes);
 
-inline bool IsDistanceFieldSupportedFillType(SkPathFillType fFillType)
+inline bool IsDistanceFieldSupportedFillType(SkPath::FillType fFillType)
 {
-    return (SkPathFillType::kEvenOdd == fFillType ||
-            SkPathFillType::kInverseEvenOdd == fFillType);
+    return (SkPath::kEvenOdd_FillType == fFillType ||
+            SkPath::kInverseEvenOdd_FillType == fFillType);
 }
 
 #endif
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index edb7611..dd3472c 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -1493,7 +1493,7 @@
     assert_alive(paint);
     this->drawShapeUsingPathRenderer(
             clip, std::move(paint), aa, viewMatrix,
-            GrShape(SkRRect::MakeOval(oval), SkPathDirection::kCW, 2, false, style));
+            GrShape(SkRRect::MakeOval(oval), SkPath::kCW_Direction, 2, false, style));
 }
 
 void GrRenderTargetContext::drawArc(const GrClip& clip,
diff --git a/src/gpu/GrTestUtils.cpp b/src/gpu/GrTestUtils.cpp
index cabac43..c6e95a3 100644
--- a/src/gpu/GrTestUtils.cpp
+++ b/src/gpu/GrTestUtils.cpp
@@ -232,7 +232,7 @@
         gPath[2].lineTo(-50.0f,  31.0f);
 
         for (size_t i = 0; i < SK_ARRAY_COUNT(gPath); i++) {
-            SkASSERT(SkPathConvexityType::kConvex == (SkPathConvexityType)gPath[i].getConvexity());
+            SkASSERT(SkPath::kConvex_Convexity == gPath[i].getConvexity());
         }
     }
 
diff --git a/src/gpu/ccpr/GrCCFiller.cpp b/src/gpu/ccpr/GrCCFiller.cpp
index 9a6c9dd..9c09b4a 100644
--- a/src/gpu/ccpr/GrCCFiller.cpp
+++ b/src/gpu/ccpr/GrCCFiller.cpp
@@ -135,7 +135,7 @@
         // We use "winding" fill type right now because we are producing a coverage count, and must
         // fill in every region that has non-zero wind. The path processor will convert coverage
         // count to the appropriate fill type later.
-        fan.setFillType(SkPathFillType::kWinding);
+        fan.setFillType(SkPath::kWinding_FillType);
     } else {
         // When counting winding numbers in the stencil buffer, it works to just tessellate the
         // Redbook fan with the same fill type as the path.
diff --git a/src/gpu/geometry/GrShape.cpp b/src/gpu/geometry/GrShape.cpp
index a510a19..4fc3472 100644
--- a/src/gpu/geometry/GrShape.cpp
+++ b/src/gpu/geometry/GrShape.cpp
@@ -201,7 +201,7 @@
     const int conicWeightCnt = SkPathPriv::ConicWeightCnt(path);
     SkASSERT(verbCnt <= GrShape::kMaxKeyFromDataVerbCnt);
     SkASSERT(pointCnt && verbCnt);
-    *key++ = (uint32_t)path.getFillType();
+    *key++ = path.getFillType();
     *key++ = verbCnt;
     memcpy(key, SkPathPriv::VerbData(path), verbCnt * sizeof(uint8_t));
     int verbKeySize = SkAlign4(verbCnt);
@@ -273,7 +273,7 @@
             case Type::kRRect:
                 fRRectData.fRRect.writeToMemory(key);
                 key += SkRRect::kSizeInMemory / sizeof(uint32_t);
-                *key = (fRRectData.fDir == SkPathDirection::kCCW) ? (1 << 31) : 0;
+                *key = (fRRectData.fDir == SkPath::kCCW_Direction) ? (1 << 31) : 0;
                 *key |= fRRectData.fInverted ? (1 << 30) : 0;
                 *key++ |= fRRectData.fStart;
                 SkASSERT(fRRectData.fStart < 8);
@@ -297,7 +297,7 @@
                 *key++ = fPathData.fGenID;
                 // We could canonicalize the fill rule for paths that don't differentiate between
                 // even/odd or winding fill (e.g. convex).
-                *key++ = (uint32_t)this->path().getFillType();
+                *key++ = this->path().getFillType();
                 break;
             }
         }
@@ -507,7 +507,7 @@
 void GrShape::attemptToSimplifyPath() {
     SkRect rect;
     SkRRect rrect;
-    SkPathDirection rrectDir;
+    SkPath::Direction rrectDir;
     unsigned rrectStart;
     bool inverted = this->path().isInverseFillType();
     SkPoint pts[2];
diff --git a/src/gpu/geometry/GrShape.h b/src/gpu/geometry/GrShape.h
index 8771c94..37f38f8 100644
--- a/src/gpu/geometry/GrShape.h
+++ b/src/gpu/geometry/GrShape.h
@@ -61,7 +61,7 @@
         this->attemptToSimplifyRRect();
     }
 
-    GrShape(const SkRRect& rrect, SkPathDirection dir, unsigned start, bool inverted,
+    GrShape(const SkRRect& rrect, SkPath::Direction dir, unsigned start, bool inverted,
             const GrStyle& style)
         : fStyle(style) {
         this->initType(Type::kRRect);
@@ -160,7 +160,7 @@
     }
 
     /** Returns the unstyled geometry as a rrect if possible. */
-    bool asRRect(SkRRect* rrect, SkPathDirection* dir, unsigned* start, bool* inverted) const {
+    bool asRRect(SkRRect* rrect, SkPath::Direction* dir, unsigned* start, bool* inverted) const {
         if (Type::kRRect != fType) {
             return false;
         }
@@ -255,12 +255,12 @@
             return false;
         }
 
-        SkPathDirection dirs[2];
+        SkPath::Direction dirs[2];
         if (!SkPathPriv::IsNestedFillRects(this->path(), rects, dirs)) {
             return false;
         }
 
-        if (SkPathFillType::kWinding == (SkPathFillType)this->path().getFillType() && dirs[0] == dirs[1]) {
+        if (SkPath::kWinding_FillType == this->path().getFillType() && dirs[0] == dirs[1]) {
             // The two rects need to be wound opposite to each other
             return false;
         }
@@ -550,15 +550,15 @@
     const SkPath* originalPathForListeners() const;
 
     // Defaults to use when there is no distinction between even/odd and winding fills.
-    static constexpr SkPathFillType kDefaultPathFillType = SkPathFillType::kEvenOdd;
-    static constexpr SkPathFillType kDefaultPathInverseFillType =
-            SkPathFillType::kInverseEvenOdd;
+    static constexpr SkPath::FillType kDefaultPathFillType = SkPath::kEvenOdd_FillType;
+    static constexpr SkPath::FillType kDefaultPathInverseFillType =
+            SkPath::kInverseEvenOdd_FillType;
 
-    static constexpr SkPathDirection kDefaultRRectDir = SkPathDirection::kCW;
+    static constexpr SkPath::Direction kDefaultRRectDir = SkPath::kCW_Direction;
     static constexpr unsigned kDefaultRRectStart = 0;
 
     static unsigned DefaultRectDirAndStartIndex(const SkRect& rect, bool hasPathEffect,
-                                                SkPathDirection* dir) {
+                                                SkPath::Direction* dir) {
         *dir = kDefaultRRectDir;
         // This comes from SkPath's interface. The default for adding a SkRect is counter clockwise
         // beginning at index 0 (which happens to correspond to rrect index 0 or 7).
@@ -575,11 +575,11 @@
             // 0 becomes start index 2 and times 2 to convert from rect the rrect indices.
             return 2 * 2;
         } else if (swapX) {
-            *dir = SkPathDirection::kCCW;
+            *dir = SkPath::kCCW_Direction;
             // 0 becomes start index 1 and times 2 to convert from rect the rrect indices.
             return 2 * 1;
         } else if (swapY) {
-            *dir = SkPathDirection::kCCW;
+            *dir = SkPath::kCCW_Direction;
             // 0 becomes start index 3 and times 2 to convert from rect the rrect indices.
             return 2 * 3;
         }
@@ -587,7 +587,7 @@
     }
 
     static unsigned DefaultRRectDirAndStartIndex(const SkRRect& rrect, bool hasPathEffect,
-                                                 SkPathDirection* dir) {
+                                                 SkPath::Direction* dir) {
         // This comes from SkPath's interface. The default for adding a SkRRect to a path is
         // clockwise beginning at starting index 6.
         static constexpr unsigned kPathRRectStartIdx = 6;
@@ -602,7 +602,7 @@
     union {
         struct {
             SkRRect fRRect;
-            SkPathDirection fDir;
+            SkPath::Direction fDir;
             unsigned fStart;
             bool fInverted;
         } fRRectData;
diff --git a/src/gpu/ops/GrAAConvexTessellator.cpp b/src/gpu/ops/GrAAConvexTessellator.cpp
index 9468692..9952491 100644
--- a/src/gpu/ops/GrAAConvexTessellator.cpp
+++ b/src/gpu/ops/GrAAConvexTessellator.cpp
@@ -369,7 +369,7 @@
 }
 
 bool GrAAConvexTessellator::extractFromPath(const SkMatrix& m, const SkPath& path) {
-    SkASSERT(SkPathConvexityType::kConvex == (SkPathConvexityType)path.getConvexity());
+    SkASSERT(SkPath::kConvex_Convexity == path.getConvexity());
 
     SkRect bounds = path.getBounds();
     m.mapRect(&bounds);