Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(232)

Unified Diff: tests/PathOpsExtendedTest.cpp

Issue 272153002: fix bugs found by computing flat clips in 800K skps (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix maybe-uninitialized error in unbuntu Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/PathOpsDebug.cpp ('k') | tests/PathOpsLineIntersectionTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsExtendedTest.cpp
diff --git a/tests/PathOpsExtendedTest.cpp b/tests/PathOpsExtendedTest.cpp
index 280307a775dc2d59376d58bdc4ba8f95db00d6b1..fe3d24d6a09b27d88f753144d6d750061c80a8f7 100644
--- a/tests/PathOpsExtendedTest.cpp
+++ b/tests/PathOpsExtendedTest.cpp
@@ -156,6 +156,11 @@ static void showPathData(const SkPath& path) {
while ((verb = iter.next(pts)) != SkPath::kDone_Verb) {
switch (verb) {
case SkPath::kMove_Verb:
+ if (firstPtSet && lastPtSet && firstPt != lastPt) {
+ SkDebugf("{{%1.9g,%1.9g}, {%1.9g,%1.9g}},\n", lastPt.fX, lastPt.fY,
+ firstPt.fX, firstPt.fY);
+ lastPtSet = false;
+ }
firstPt = pts[0];
firstPtSet = true;
continue;
@@ -190,6 +195,10 @@ static void showPathData(const SkPath& path) {
return;
}
}
+ if (firstPtSet && lastPtSet && firstPt != lastPt) {
+ SkDebugf("{{%1.9g,%1.9g}, {%1.9g,%1.9g}},\n", lastPt.fX, lastPt.fY,
+ firstPt.fX, firstPt.fY);
+ }
}
#endif
@@ -410,7 +419,6 @@ static void showPathOpPath(const char* testName, const SkPath& one, const SkPath
SkDebugf("static void %s(skiatest::Reporter* reporter, const char* filename) {\n", testName);
*gTestOp.append() = shapeOp;
++gTestNo;
- SkDebugf("\n*** this test fails ***\n");
SkDebugf(" SkPath path, pathB;\n");
showPath(a, "path", false);
showPath(b, "pathB", false);
@@ -440,6 +448,7 @@ static int comparePaths(skiatest::Reporter* reporter, const char* testName, cons
if (errors2x2 > MAX_ERRORS && gComparePathsAssert) {
SK_DECLARE_STATIC_MUTEX(compareDebugOut3);
SkAutoMutexAcquire autoM(compareDebugOut3);
+ SkDebugf("\n*** this test fails ***\n");
showPathOpPath(testName, one, two, a, b, scaledOne, scaledTwo, shapeOp, scale);
REPORTER_ASSERT(reporter, 0);
} else if (gShowPath || errors2x2 == MAX_ERRORS || errors2x2 == MAX_ERRORS - 1) {
« no previous file with comments | « tests/PathOpsDebug.cpp ('k') | tests/PathOpsLineIntersectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698