aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpAngle.cpp
diff options
context:
space:
mode:
authorGravatar hcm <hcm@google.com>2014-10-28 10:55:54 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2014-10-28 10:55:54 -0700
commit27c46a08a9210e9306b8ea1b00349ec198153c38 (patch)
tree31548283108b4e997adc12651ae77acbb6c3fc8c /src/pathops/SkOpAngle.cpp
parentee0c2e4fd429424beaa35f29e7f656997ba3f115 (diff)
Revert of harden pathops for pathological test (patchset #19 id:410001 of https://codereview.chromium.org/633393002/)
Reason for revert: Compile errors on bots Original issue's description: > These tests stress pathops by describing the union of circle-like paths that have tiny line segments embedded and double back to create near-coincident conditions. > > The fixes include > - detect when finding the active top loops between two possible answers > - preflight chasing winding to ensure answer is consistent > - binary search more often when quadratic intersection fails > - add more failure paths when an intersect is missed > > While this fixes the chrome bug, reenabling path ops in svg should be deferred until additional fixes are landed. > > TBR= > BUG=421132 > > Committed: https://skia.googlesource.com/skia/+/6f726addf3178b01949bb389ef83cf14a1d7b6b2 TBR=caryclark@google.com NOTREECHECKS=true NOTRY=true BUG=421132 Review URL: https://codereview.chromium.org/686843002
Diffstat (limited to 'src/pathops/SkOpAngle.cpp')
-rw-r--r--src/pathops/SkOpAngle.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/pathops/SkOpAngle.cpp b/src/pathops/SkOpAngle.cpp
index b3a188c1e8..0c87d3ba9e 100644
--- a/src/pathops/SkOpAngle.cpp
+++ b/src/pathops/SkOpAngle.cpp
@@ -409,12 +409,7 @@ bool SkOpAngle::endsIntersect(const SkOpAngle& rh) const {
for (int index = 0; index < 2; ++index) {
const SkOpSegment& segment = index ? *rh.fSegment : *fSegment;
SkIntersections i;
- int cPts = index ? rPts : lPts;
- (*CurveIntersectRay[cPts])(segment.pts(), rays[index], &i);
- // if the curve is a line, then the line and the ray intersect only at their crossing
- if (cPts == 1) { // line
- continue;
- }
+ (*CurveIntersectRay[index ? rPts : lPts])(segment.pts(), rays[index], &i);
// SkASSERT(i.used() >= 1);
// if (i.used() <= 1) {
// continue;
@@ -662,7 +657,7 @@ void SkOpAngle::insert(SkOpAngle* angle) {
}
SkOpAngle* next = fNext;
if (next->fNext == this) {
- if (angle->overlap(*this)) { // angles are essentially coincident
+ if (angle->overlap(*this)) {
return;
}
if (singleton || angle->after(this)) {
@@ -782,7 +777,7 @@ bool SkOpAngle::merge(SkOpAngle* angle) {
working = next;
} while (working != angle);
// it's likely that a pair of the angles are unorderable
-#if 0 && DEBUG_ANGLE
+#if DEBUG_ANGLE
SkOpAngle* last = angle;
working = angle->fNext;
do {