aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pathops/SkOpSegment.h
diff options
context:
space:
mode:
authorGravatar caryclark <caryclark@google.com>2016-10-18 07:59:44 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-10-18 07:59:44 -0700
commitb36a3cd137e2b6c328854015018594bb9967e493 (patch)
tree78e6c88a0915d3004381a359f9a517341fe4aa97 /src/pathops/SkOpSegment.h
parentc5eceb00adaa05e50ed732985a2df7db17c80053 (diff)
break ambiguous angle sorting loop
A pair of cubics may be difficult to sort if the tangents suggest one sort but the midpoints suggest a different one. When in this gray area, and when the cumulative sort of all the angles fails to resolve, reverse the sort to break the tie. Before, when tiger8 was run through the signed distance field generated directly from the path data, the simplify call might hang since the angle could not be resolved. If the endless loop is detected, and if there is no tie to break, just fail instead. TBR=reed@google.com BUG=skia:5131 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2426753002 Review-Url: https://codereview.chromium.org/2426753002
Diffstat (limited to 'src/pathops/SkOpSegment.h')
-rw-r--r--src/pathops/SkOpSegment.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pathops/SkOpSegment.h b/src/pathops/SkOpSegment.h
index b6e7714018..e9618ceeb2 100644
--- a/src/pathops/SkOpSegment.h
+++ b/src/pathops/SkOpSegment.h
@@ -371,7 +371,7 @@ public:
int* maxWinding, int* sumWinding);
void setUpWindings(SkOpSpanBase* start, SkOpSpanBase* end, int* sumMiWinding, int* sumSuWinding,
int* maxWinding, int* sumWinding, int* oppMaxWinding, int* oppSumWinding);
- void sortAngles();
+ bool sortAngles();
bool spansNearby(const SkOpSpanBase* ref, const SkOpSpanBase* check) const;
static int SpanSign(const SkOpSpanBase* start, const SkOpSpanBase* end) {