Revert "Reland "Revert "Use flat version of path-direction enum"""

This reverts commit 7cda6f37439f69b1e4a9b08147f9c12ddad1bddb.

Reason for revert: legacy convexity code removed -- google3 should be ok

Original change's description:
> Reland "Revert "Use flat version of path-direction enum""
>
> This reverts commit 1792b19485cacb0c950a3c0ea0aab763a8d43176.
>
> Reason for revert: need to update legacy_convexity, still used by google3
>
> Original change's description:
> > Revert "Revert "Use flat version of path-direction enum""
> >
> > This reverts commit 0dacc6b7d3027e8181311a61f7ca798be52a0250.
> >
> > Change-Id: Ie103e9f36b07e4ee256a3688a4decf3a6dd74314
> > Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255832
> > Auto-Submit: Mike Reed <reed@google.com>
> > Reviewed-by: Mike Reed <reed@google.com>
> > Commit-Queue: Mike Reed <reed@google.com>
>
> TBR=reed@google.com
>
> Change-Id: I0ecea0eb8a237298c6b908cc4bfd1cacdfc5b900
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255976
> Reviewed-by: Mike Reed <reed@google.com>
> Commit-Queue: Mike Reed <reed@google.com>

TBR=reed@google.com

Change-Id: I3529139bb391c4f62ce5cd0744cdf38a13b71d78
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255984
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 0e1fc1a..bd8c894 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -1415,7 +1415,7 @@
     assert_alive(paint);
     this->drawShapeUsingPathRenderer(
             clip, std::move(paint), aa, viewMatrix,
-            GrShape(SkRRect::MakeOval(oval), SkPath::kCW_Direction, 2, false, style));
+            GrShape(SkRRect::MakeOval(oval), SkPathDirection::kCW, 2, false, style));
 }
 
 void GrRenderTargetContext::drawArc(const GrClip& clip,
diff --git a/src/gpu/GrTestUtils.cpp b/src/gpu/GrTestUtils.cpp
index 42aba5e..b348c78 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(SkPath::kConvex_Convexity == gPath[i].getConvexity());
+            SkASSERT(SkPathConvexityType::kConvex == gPath[i].getConvexityType());
         }
     }
 
diff --git a/src/gpu/geometry/GrShape.cpp b/src/gpu/geometry/GrShape.cpp
index 4fc3472..bb4f92b 100644
--- a/src/gpu/geometry/GrShape.cpp
+++ b/src/gpu/geometry/GrShape.cpp
@@ -273,7 +273,7 @@
             case Type::kRRect:
                 fRRectData.fRRect.writeToMemory(key);
                 key += SkRRect::kSizeInMemory / sizeof(uint32_t);
-                *key = (fRRectData.fDir == SkPath::kCCW_Direction) ? (1 << 31) : 0;
+                *key = (fRRectData.fDir == SkPathDirection::kCCW) ? (1 << 31) : 0;
                 *key |= fRRectData.fInverted ? (1 << 30) : 0;
                 *key++ |= fRRectData.fStart;
                 SkASSERT(fRRectData.fStart < 8);
@@ -507,7 +507,7 @@
 void GrShape::attemptToSimplifyPath() {
     SkRect rect;
     SkRRect rrect;
-    SkPath::Direction rrectDir;
+    SkPathDirection 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 37f38f8..08146df 100644
--- a/src/gpu/geometry/GrShape.h
+++ b/src/gpu/geometry/GrShape.h
@@ -61,7 +61,7 @@
         this->attemptToSimplifyRRect();
     }
 
-    GrShape(const SkRRect& rrect, SkPath::Direction dir, unsigned start, bool inverted,
+    GrShape(const SkRRect& rrect, SkPathDirection 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, SkPath::Direction* dir, unsigned* start, bool* inverted) const {
+    bool asRRect(SkRRect* rrect, SkPathDirection* dir, unsigned* start, bool* inverted) const {
         if (Type::kRRect != fType) {
             return false;
         }
@@ -255,7 +255,7 @@
             return false;
         }
 
-        SkPath::Direction dirs[2];
+        SkPathDirection dirs[2];
         if (!SkPathPriv::IsNestedFillRects(this->path(), rects, dirs)) {
             return false;
         }
@@ -554,11 +554,11 @@
     static constexpr SkPath::FillType kDefaultPathInverseFillType =
             SkPath::kInverseEvenOdd_FillType;
 
-    static constexpr SkPath::Direction kDefaultRRectDir = SkPath::kCW_Direction;
+    static constexpr SkPathDirection kDefaultRRectDir = SkPathDirection::kCW;
     static constexpr unsigned kDefaultRRectStart = 0;
 
     static unsigned DefaultRectDirAndStartIndex(const SkRect& rect, bool hasPathEffect,
-                                                SkPath::Direction* dir) {
+                                                SkPathDirection* 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 = SkPath::kCCW_Direction;
+            *dir = SkPathDirection::kCCW;
             // 0 becomes start index 1 and times 2 to convert from rect the rrect indices.
             return 2 * 1;
         } else if (swapY) {
-            *dir = SkPath::kCCW_Direction;
+            *dir = SkPathDirection::kCCW;
             // 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,
-                                                 SkPath::Direction* dir) {
+                                                 SkPathDirection* 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;
-            SkPath::Direction fDir;
+            SkPathDirection fDir;
             unsigned fStart;
             bool fInverted;
         } fRRectData;
diff --git a/src/gpu/ops/GrAAConvexTessellator.cpp b/src/gpu/ops/GrAAConvexTessellator.cpp
index c345c33..86aa54c 100644
--- a/src/gpu/ops/GrAAConvexTessellator.cpp
+++ b/src/gpu/ops/GrAAConvexTessellator.cpp
@@ -377,7 +377,7 @@
 }
 
 bool GrAAConvexTessellator::extractFromPath(const SkMatrix& m, const SkPath& path) {
-    SkASSERT(SkPath::kConvex_Convexity == path.getConvexity());
+    SkASSERT(SkPathConvexityType::kConvex == path.getConvexityType());
 
     SkRect bounds = path.getBounds();
     m.mapRect(&bounds);