Move convexity enum out of public
Also, move first-direction into SkPathRef.h so it can be referenced
by name in SkPath (instead of using uint8_t)
No functional change expected.
Change-Id: Ica4a8357a8156fd9a516118f23599a965b0fdd47
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/313980
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/src/pathops/SkOpBuilder.cpp b/src/pathops/SkOpBuilder.cpp
index b14baff..595553a 100644
--- a/src/pathops/SkOpBuilder.cpp
+++ b/src/pathops/SkOpBuilder.cpp
@@ -42,9 +42,9 @@
} else if (fillType == SkPathFillType::kEvenOdd) {
fillType = SkPathFillType::kWinding;
}
- SkPathPriv::FirstDirection dir;
+ SkPathFirstDirection dir;
if (one_contour(*path) && SkPathPriv::CheapComputeFirstDirection(*path, &dir)) {
- if (dir != SkPathPriv::kCCW_FirstDirection) {
+ if (dir != SkPathFirstDirection::kCCW) {
ReversePath(path);
}
path->setFillType(fillType);
@@ -127,7 +127,7 @@
SkPath original = *result;
int count = fOps.count();
bool allUnion = true;
- SkPathPriv::FirstDirection firstDir = SkPathPriv::kUnknown_FirstDirection;
+ SkPathFirstDirection firstDir = SkPathFirstDirection::kUnknown;
for (int index = 0; index < count; ++index) {
SkPath* test = &fPathRefs[index];
if (kUnion_SkPathOp != fOps[index] || test->isInverseFillType()) {
@@ -136,12 +136,12 @@
}
// If all paths are convex, track direction, reversing as needed.
if (test->isConvex()) {
- SkPathPriv::FirstDirection dir;
+ SkPathFirstDirection dir;
if (!SkPathPriv::CheapComputeFirstDirection(*test, &dir)) {
allUnion = false;
break;
}
- if (firstDir == SkPathPriv::kUnknown_FirstDirection) {
+ if (firstDir == SkPathFirstDirection::kUnknown) {
firstDir = dir;
} else if (firstDir != dir) {
ReversePath(test);