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>
diff --git a/samplecode/SampleAndroidShadows.cpp b/samplecode/SampleAndroidShadows.cpp
index a4518f2..71eb22a 100644
--- a/samplecode/SampleAndroidShadows.cpp
+++ b/samplecode/SampleAndroidShadows.cpp
@@ -53,7 +53,7 @@
fRRPath.addRRect(SkRRect::MakeRectXY(SkRect::MakeXYWH(-100, -50, 200, 100), 4, 4));
fFunkyRRPath.addRoundRect(SkRect::MakeXYWH(-50, -50, SK_Scalar1 * 100, SK_Scalar1 * 100),
40 * SK_Scalar1, 20 * SK_Scalar1,
- SkPathDirection::kCW);
+ SkPath::kCW_Direction);
fCubicPath.cubicTo(100 * SK_Scalar1, 50 * SK_Scalar1,
20 * SK_Scalar1, 100 * SK_Scalar1,
0 * SK_Scalar1, 0 * SK_Scalar1);
diff --git a/samplecode/SampleClock.cpp b/samplecode/SampleClock.cpp
index f7332ce..a90ecf1 100644
--- a/samplecode/SampleClock.cpp
+++ b/samplecode/SampleClock.cpp
@@ -160,7 +160,7 @@
#ifdef USE_PATH
path.reset();
path.arcTo(rect, 0, 0, false);
- path.addOval(rect, SkPathDirection::kCCW);
+ path.addOval(rect, SkPath::kCCW_Direction);
path.arcTo(rect, 360, 0, true);
canvas->drawPath(path, paintFill);
#else
@@ -170,7 +170,7 @@
#ifdef USE_PATH
path.reset();
path.arcTo(rect, 0, 0, false);
- path.addOval(rect, SkPathDirection::kCCW);
+ path.addOval(rect, SkPath::kCCW_Direction);
path.arcTo(rect, 360, 0, true);
canvas->drawPath(path, paintStroke);
#else
@@ -180,7 +180,7 @@
#ifdef USE_PATH
rect = SkRect::MakeLTRB(-6, -6, 6, 6);
path.arcTo(rect, 0, 0, false);
- path.addOval(rect, SkPathDirection::kCCW);
+ path.addOval(rect, SkPath::kCCW_Direction);
path.arcTo(rect, 360, 0, true);
canvas->drawPath(path, paintFill);
#else
@@ -196,7 +196,7 @@
#ifdef USE_PATH
path.reset();
path.arcTo(rect, 0, 0, false);
- path.addOval(rect, SkPathDirection::kCCW);
+ path.addOval(rect, SkPath::kCCW_Direction);
path.arcTo(rect, 360, 0, true);
canvas->drawPath(path, paintStroke);
#else
diff --git a/samplecode/SampleQuadStroker.cpp b/samplecode/SampleQuadStroker.cpp
index 53bf5eb..72dfabc 100644
--- a/samplecode/SampleQuadStroker.cpp
+++ b/samplecode/SampleQuadStroker.cpp
@@ -646,9 +646,9 @@
path.reset();
SkRRect rr2;
rr.inset(width/2, width/2, &rr2);
- path.addRRect(rr2, SkPathDirection::kCCW);
+ path.addRRect(rr2, SkPath::kCCW_Direction);
rr.inset(-width/2, -width/2, &rr2);
- path.addRRect(rr2, SkPathDirection::kCW);
+ path.addRRect(rr2, SkPath::kCW_Direction);
SkPaint paint;
paint.setAntiAlias(true);
paint.setColor(0x40FF8844);
diff --git a/samplecode/SampleRegion.cpp b/samplecode/SampleRegion.cpp
index 7c16c01..58ad5e0 100644
--- a/samplecode/SampleRegion.cpp
+++ b/samplecode/SampleRegion.cpp
@@ -32,7 +32,7 @@
SkPath path;
path.addRect(0.0f, 0.0f,
SkIntToScalar(width), SkIntToScalar(height),
- SkPathDirection::kCW);
+ SkPath::kCW_Direction);
SkRect r = SkRect::MakeWH(SkIntToScalar(width), SkIntToScalar(height));
SkCanvas c(bitmap);
diff --git a/samplecode/SampleSlides.cpp b/samplecode/SampleSlides.cpp
index d58f4f1..09cb87c 100644
--- a/samplecode/SampleSlides.cpp
+++ b/samplecode/SampleSlides.cpp
@@ -136,9 +136,9 @@
path.reset();
SkRect r = { 0, 0, 250, 120 };
- path.addOval(r, SkPathDirection::kCW);
+ path.addOval(r, SkPath::kCW_Direction);
r.inset(50, 50);
- path.addRect(r, SkPathDirection::kCCW);
+ path.addRect(r, SkPath::kCCW_Direction);
canvas->translate(320, 20);
for (i = 0; i < SK_ARRAY_COUNT(gPE2); i++) {
diff --git a/samplecode/SampleStrokePath.cpp b/samplecode/SampleStrokePath.cpp
index 3ab8bf4..4963f97 100644
--- a/samplecode/SampleStrokePath.cpp
+++ b/samplecode/SampleStrokePath.cpp
@@ -112,8 +112,8 @@
"Z";
SkParsePath::FromSVGString(str, &fPath);
#else
- fPath.addCircle(0, 0, SkIntToScalar(50), SkPathDirection::kCW);
- fPath.addCircle(0, SkIntToScalar(-50), SkIntToScalar(30), SkPathDirection::kCW);
+ fPath.addCircle(0, 0, SkIntToScalar(50), SkPath::kCW_Direction);
+ fPath.addCircle(0, SkIntToScalar(-50), SkIntToScalar(30), SkPath::kCW_Direction);
#endif
scale_to_width(&fPath, fWidth);