aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsExtendedTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2015-04-23 09:13:37 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-04-23 09:13:37 -0700
commit03b03cad01628146bbb8d4f33c073bd0c77ee558 (patch)
tree3daa35fc7a85abd54f6d48e23d3f8f665b677dc5 /tests/PathOpsExtendedTest.cpp
parent4b17fa353e777de309ca8b0706f1d3e326b59822 (diff)
working on initial winding for cubics
Path ops works well for all tests except for cubics. Isolate failures caused by cubics, and do a better job of computing the initial winding for cubics. TBR=reed@google.com BUG=skia:3588 Review URL: https://codereview.chromium.org/1096923003
Diffstat (limited to 'tests/PathOpsExtendedTest.cpp')
-rw-r--r--tests/PathOpsExtendedTest.cpp29
1 files changed, 25 insertions, 4 deletions
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index f303ad1f16..c316242f75 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -289,7 +289,7 @@ int comparePaths(skiatest::Reporter* reporter, const char* filename, const SkPat
return errors2x2 > MAX_ERRORS ? errors2x2 : 0;
}
-const int gTestFirst = 4;
+const int gTestFirst = 6;
static int gTestNo = gTestFirst;
static SkTDArray<SkPathOp> gTestOp;
@@ -654,13 +654,34 @@ void RunTestSet(skiatest::Reporter* reporter, TestDesc tests[], size_t count,
#endif
(*tests[index].fun)(reporter, tests[index].str);
}
- if (tests[index].fun == stopTest) {
- SkDebugf("lastTest\n");
+ if (tests[index].fun == stopTest || index == last) {
break;
}
- if (index == last) {
+ index += reverse ? -1 : 1;
+ } while (true);
+#if DEBUG_SHOW_TEST_NAME
+ SkDebugf(
+ "\n"
+ "</div>\n"
+ "\n"
+ "<script type=\"text/javascript\">\n"
+ "\n"
+ "var testDivs = [\n"
+ );
+ index = reverse ? count - 1 : 0;
+ last = reverse ? 0 : count - 1;
+ foundSkip = !skipTest;
+ do {
+ if (tests[index].fun == skipTest) {
+ foundSkip = true;
+ }
+ if (foundSkip && tests[index].fun != firstTest) {
+ SkDebugf(" %s,\n", tests[index].str);
+ }
+ if (tests[index].fun == stopTest || index == last) {
break;
}
index += reverse ? -1 : 1;
} while (true);
+#endif
}