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

Unified Diff: src/pathops/SkDCubicIntersection.cpp

Issue 131103009: update pathops to circle sort (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: disable old test that still fails on linux 32 release 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/SkAddIntersections.cpp ('k') | src/pathops/SkDCubicToQuads.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkDCubicIntersection.cpp
diff --git a/src/pathops/SkDCubicIntersection.cpp b/src/pathops/SkDCubicIntersection.cpp
index bb734e19da7569cec0a704728e7a76dabe2c98bd..dc1063c34ca29b9aa8dca585ed96e05db92e0abe 100644
--- a/src/pathops/SkDCubicIntersection.cpp
+++ b/src/pathops/SkDCubicIntersection.cpp
@@ -134,7 +134,10 @@ static void intersect(const SkDCubic& cubic1, double t1s, double t1e, const SkDC
}
}
} else {
- double offset = precisionScale / 16; // FIME: const is arbitrary: test, refine
+/*for random cubics, 16 below catches 99.997% of the intersections. To test for the remaining 0.003%
+ look for nearly coincident curves. and check each 1/16th section.
+*/
+ double offset = precisionScale / 16; // FIXME: const is arbitrary: test, refine
double c1Bottom = tIdx == 0 ? 0 :
(t1Start + (t1 - t1Start) * locals[0][tIdx - 1] + to1) / 2;
double c1Min = SkTMax(c1Bottom, to1 - offset);
« no previous file with comments | « src/pathops/SkAddIntersections.cpp ('k') | src/pathops/SkDCubicToQuads.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698