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

Unified Diff: src/pathops/SkDCubicIntersection.cpp

Issue 686843002: Revert of harden pathops for pathological test (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 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/SkDQuadIntersection.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 2fb35e182794dcec2bb86cb654a0d7d22a3b0af0..9d83242eda6085171615d47af598bcd65fb019dd 100644
--- a/src/pathops/SkDCubicIntersection.cpp
+++ b/src/pathops/SkDCubicIntersection.cpp
@@ -109,14 +109,12 @@
__FUNCTION__, t1Start, t1, t2Start, t2);
SkIntersections xlocals;
xlocals.allowNear(false);
- xlocals.allowFlatMeasure(true);
intersectWithOrder(s1.fQuad, o1, s2.fQuad, o2, xlocals);
SkDebugf(" xlocals.fUsed=%d\n", xlocals.used());
}
#endif
SkIntersections locals;
locals.allowNear(false);
- locals.allowFlatMeasure(true);
intersectWithOrder(s1.fQuad, o1, s2.fQuad, o2, locals);
int tCount = locals.used();
for (int tIdx = 0; tIdx < tCount; ++tIdx) {
@@ -298,7 +296,6 @@
tmpLine[1].fY -= cubic2[2 - start].fX - cubic2[t1Index].fX;
SkIntersections impTs;
impTs.allowNear(false);
- impTs.allowFlatMeasure(true);
impTs.intersectRay(cubic1, tmpLine);
for (int index = 0; index < impTs.used(); ++index) {
SkDPoint realPt = impTs.pt(index);
@@ -559,7 +556,6 @@
}
SkIntersections i;
i.fAllowNear = false;
- i.fFlatMeasure = true;
i.fMax = 9;
::intersect(c1, 0, 1, c2, 0, 1, 1, i);
int compCount = i.used();
@@ -666,7 +662,7 @@
// OPTIMIZATION If this is a common use case, optimize by duplicating
// the intersect 3 loop to avoid the promotion / demotion code
int SkIntersections::intersect(const SkDCubic& cubic, const SkDQuad& quad) {
- fMax = 7;
+ fMax = 6;
SkDCubic up = quad.toCubic();
(void) intersect(cubic, up);
return used();
@@ -688,9 +684,7 @@
// OPTIMIZATION: could quick reject if neither end point tangent ray intersected the line
// segment formed by the opposite end point to the control point
(void) intersect(c, c);
- if (used() > 1) {
- fUsed = 0;
- } else if (used() > 0) {
+ if (used() > 0) {
if (approximately_equal_double(fT[0][0], fT[1][0])) {
fUsed = 0;
} else {
« no previous file with comments | « src/pathops/SkAddIntersections.cpp ('k') | src/pathops/SkDQuadIntersection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698