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

Unified Diff: src/pathops/SkDQuadLineIntersection.cpp

Issue 239563004: fix minor skp-found bugs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix mac-detected errors Created 6 years, 8 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/SkDLineIntersection.cpp ('k') | src/pathops/SkIntersections.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 45daa10dbdd35a3cb4ebc1ce4a852935fa8e1890..1b9d8ccd382e7fd7e16f58e9cf0f31f5b2496c02 100644
--- a/src/pathops/SkDQuadLineIntersection.cpp
+++ b/src/pathops/SkDQuadLineIntersection.cpp
@@ -98,7 +98,7 @@ public:
, fLine(l)
, fIntersections(i)
, fAllowNear(true) {
- i->setMax(2);
+ i->setMax(3); // allow short partial coincidence plus discrete intersection
}
void allowNear(bool allow) {
@@ -331,6 +331,9 @@ protected:
*pt = fLine[1];
*lineT = 1;
}
+ if (fIntersections->used() > 0 && approximately_equal((*fIntersections)[1][0], *lineT)) {
+ return false;
+ }
if (gridPt == fQuad[0].asSkPoint()) {
*pt = fQuad[0];
*quadT = 0;
« no previous file with comments | « src/pathops/SkDLineIntersection.cpp ('k') | src/pathops/SkIntersections.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698