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

Unified Diff: src/pathops/SkDQuadLineIntersection.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/SkDQuadIntersection.cpp ('k') | src/pathops/SkIntersectionHelper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkDQuadLineIntersection.cpp
diff --git a/src/pathops/SkDQuadLineIntersection.cpp b/src/pathops/SkDQuadLineIntersection.cpp
index 1b9d8ccd382e7fd7e16f58e9cf0f31f5b2496c02..ef8edb02cda0959a3700a971c9d3c7d7ac674ab2 100644
--- a/src/pathops/SkDQuadLineIntersection.cpp
+++ b/src/pathops/SkDQuadLineIntersection.cpp
@@ -238,7 +238,7 @@ protected:
if (fIntersections->hasT(quadT)) {
continue;
}
- double lineT = fLine.nearPoint(fQuad[qIndex]);
+ double lineT = fLine.nearPoint(fQuad[qIndex], NULL);
if (lineT < 0) {
continue;
}
@@ -324,10 +324,10 @@ protected:
*pt = fQuad.ptAtT(qT);
}
SkPoint gridPt = pt->asSkPoint();
- if (gridPt == fLine[0].asSkPoint()) {
+ if (SkDPoint::ApproximatelyEqual(gridPt, fLine[0].asSkPoint())) {
*pt = fLine[0];
*lineT = 0;
- } else if (gridPt == fLine[1].asSkPoint()) {
+ } else if (SkDPoint::ApproximatelyEqual(gridPt, fLine[1].asSkPoint())) {
*pt = fLine[1];
*lineT = 1;
}
« no previous file with comments | « src/pathops/SkDQuadIntersection.cpp ('k') | src/pathops/SkIntersectionHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698