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

Unified Diff: tests/PathOpsAngleIdeas.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 | « src/pathops/SkPathOpsTypes.h ('k') | tests/PathOpsAngleTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PathOpsAngleIdeas.cpp
diff --git a/tests/PathOpsAngleIdeas.cpp b/tests/PathOpsAngleIdeas.cpp
index 2887b28febbc2b5dda2f1ec7d1df172704e8e96d..901cab2bb5202a75dabc02ee922d766085752096 100755
--- a/tests/PathOpsAngleIdeas.cpp
+++ b/tests/PathOpsAngleIdeas.cpp
@@ -426,7 +426,8 @@ static void testQuadAngles(skiatest::Reporter* reporter, const SkDQuad& quad1, c
SkOpSegment seg[2];
makeSegment(quad1, shortQuads[0], &seg[0]);
makeSegment(quad2, shortQuads[1], &seg[1]);
- int realOverlap = PathOpsAngleTester::ConvexHullOverlaps(seg[0].angle(0), seg[1].angle(0));
+ int realOverlap = PathOpsAngleTester::ConvexHullOverlaps(*seg[0].debugLastAngle(),
+ *seg[1].debugLastAngle());
const SkDPoint& origin = quad1[0];
REPORTER_ASSERT(reporter, origin == quad2[0]);
double a1s = atan2(origin.fY - quad1[1].fY, quad1[1].fX - origin.fX);
@@ -544,7 +545,8 @@ static void testQuadAngles(skiatest::Reporter* reporter, const SkDQuad& quad1, c
}
if (overlap < 0) {
SkDEBUGCODE(int realEnds =)
- PathOpsAngleTester::EndsIntersect(seg[0].angle(0), seg[1].angle(0));
+ PathOpsAngleTester::EndsIntersect(*seg[0].debugLastAngle(),
+ *seg[1].debugLastAngle());
SkASSERT(realEnds == (firstInside ? 1 : 0));
}
bruteForce(reporter, quad1, quad2, firstInside);
« no previous file with comments | « src/pathops/SkPathOpsTypes.h ('k') | tests/PathOpsAngleTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698