diff options
author | caryclark <caryclark@google.com> | 2016-04-05 07:28:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-05 07:28:48 -0700 |
commit | 5c5cfe24efe4c728e787447dabffe345080d1fb9 (patch) | |
tree | c8b9c3d926c3e1806542c30b561a1be9dbceccce /src/pathops/SkPathOpsCommon.cpp | |
parent | 3b597388b35967a751fb055d0b8fcc30b443b5a8 (diff) |
give up if huge paths have unresolvable coincidence
This fuzzy test has enormous curves with coincidence runs that break numerics.
If the computed intersections identify that the span of coincidence has been deleted,
give up and return that the path op failed.
TBR=reed@google.com
BUG=597926
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1854333002
Review URL: https://codereview.chromium.org/1854333002
Diffstat (limited to 'src/pathops/SkPathOpsCommon.cpp')
-rw-r--r-- | src/pathops/SkPathOpsCommon.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp index 829f8a50d5..86a8cb0bef 100644 --- a/src/pathops/SkPathOpsCommon.cpp +++ b/src/pathops/SkPathOpsCommon.cpp @@ -494,7 +494,9 @@ bool HandleCoincidence(SkOpContourHead* contourList, SkOpCoincidence* coincidenc } DEBUG_COINCIDENCE_HEALTH(contourList, "expand2"); // the expanded ranges may not align -- add the missing spans - coincidence->mark(); // mark spans of coincident segments as coincident + if (!coincidence->mark()) { // mark spans of coincident segments as coincident + return false; + } DEBUG_COINCIDENCE_HEALTH(contourList, "mark1"); // look for coincidence missed earlier if (missingCoincidence(contourList, coincidence, allocator)) { |