switch to new filltype for SkPath
Change-Id: I7793324a9acf4afb0eb38c1e20fbb38eac25d636
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/256102
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
diff --git a/tests/PathOpsOpCubicThreadedTest.cpp b/tests/PathOpsOpCubicThreadedTest.cpp
index 50eb414..e453483 100644
--- a/tests/PathOpsOpCubicThreadedTest.cpp
+++ b/tests/PathOpsOpCubicThreadedTest.cpp
@@ -19,21 +19,22 @@
strncpy(DEBUG_FILENAME_STRING, "", DEBUG_FILENAME_STRING_LENGTH);
#endif
SkASSERT(data);
+ const SkPathFillType fts[] = { SkPathFillType::kWinding, SkPathFillType::kEvenOdd };
PathOpsThreadState& state = *data;
SkString pathStr;
for (int a = 0 ; a < 6; ++a) {
for (int b = a + 1 ; b < 7; ++b) {
for (int c = 0 ; c < 6; ++c) {
for (int d = c + 1 ; d < 7; ++d) {
- for (int e = SkPath::kWinding_FillType ; e <= SkPath::kEvenOdd_FillType; ++e) {
- for (int f = SkPath::kWinding_FillType ; f <= SkPath::kEvenOdd_FillType; ++f) {
+ for (auto e : fts) {
+ for (auto f : fts) {
SkPath pathA, pathB;
- pathA.setFillType((SkPath::FillType) e);
+ pathA.setFillType((SkPathFillType) e);
pathA.moveTo(SkIntToScalar(state.fA), SkIntToScalar(state.fB));
pathA.cubicTo(SkIntToScalar(state.fC), SkIntToScalar(state.fD), SkIntToScalar(b),
SkIntToScalar(a), SkIntToScalar(d), SkIntToScalar(c));
pathA.close();
- pathB.setFillType((SkPath::FillType) f);
+ pathB.setFillType((SkPathFillType) f);
pathB.moveTo(SkIntToScalar(a), SkIntToScalar(b));
pathB.cubicTo(SkIntToScalar(c), SkIntToScalar(d), SkIntToScalar(state.fB),
SkIntToScalar(state.fA), SkIntToScalar(state.fD), SkIntToScalar(state.fC));
@@ -43,15 +44,15 @@
pathStr.printf("static void cubicOp%d(skiatest::Reporter* reporter,"
" const char* filename) {\n", loopNo);
pathStr.appendf(" SkPath path, pathB;\n");
- pathStr.appendf(" path.setFillType(SkPath::k%s_FillType);\n",
- e == SkPath::kWinding_FillType ? "Winding" : e == SkPath::kEvenOdd_FillType
+ pathStr.appendf(" path.setFillType(SkPathFillType::k%s);\n",
+ e == SkPathFillType::kWinding ? "Winding" : e == SkPathFillType::kEvenOdd
? "EvenOdd" : "?UNDEFINED");
pathStr.appendf(" path.moveTo(%d,%d);\n", state.fA, state.fB);
pathStr.appendf(" path.cubicTo(%d,%d, %d,%d, %d,%d);\n", state.fC, state.fD,
b, a, d, c);
pathStr.appendf(" path.close();\n");
- pathStr.appendf(" pathB.setFillType(SkPath::k%s_FillType);\n",
- f == SkPath::kWinding_FillType ? "Winding" : f == SkPath::kEvenOdd_FillType
+ pathStr.appendf(" pathB.setFillType(SkPathFillType::k%s);\n",
+ f == SkPathFillType::kWinding ? "Winding" : f == SkPathFillType::kEvenOdd
? "EvenOdd" : "?UNDEFINED");
pathStr.appendf(" pathB.moveTo(%d,%d);\n", a, b);
pathStr.appendf(" pathB.cubicTo(%d,%d, %d,%d, %d,%d);\n", c, d,