diff options
author | caryclark <caryclark@google.com> | 2015-05-14 05:45:54 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-14 05:45:54 -0700 |
commit | 182b499cd75c971f85cdf52c1827b3c220cc9011 (patch) | |
tree | 70d3a7884731de198bf99afb0914cb390639c420 /src/pathops/SkOpSegment.cpp | |
parent | eea2ff72014d985166e8c2aab3537bd32591900a (diff) |
look for deleted pts when detecting line/curve coincident edges
TBR=reed@google.com
BUG=skia:3651
Review URL: https://codereview.chromium.org/1129863007
Diffstat (limited to 'src/pathops/SkOpSegment.cpp')
-rw-r--r-- | src/pathops/SkOpSegment.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/pathops/SkOpSegment.cpp b/src/pathops/SkOpSegment.cpp index 01417d6b8f..8bd0f03518 100644 --- a/src/pathops/SkOpSegment.cpp +++ b/src/pathops/SkOpSegment.cpp @@ -1119,6 +1119,9 @@ void SkOpSegment::missingCoincidence(SkOpCoincidence* coincidences, SkChunkAlloc SkOpPtT* ptT = spanBase->ptT(), * spanStopPtT = ptT; SkASSERT(ptT->span() == spanBase); while ((ptT = ptT->next()) != spanStopPtT) { + if (ptT->deleted()) { + continue; + } SkOpSegment* opp = ptT->span()->segment(); if (opp->verb() == SkPath::kLine_Verb) { continue; @@ -1149,6 +1152,9 @@ void SkOpSegment::missingCoincidence(SkOpCoincidence* coincidences, SkChunkAlloc while (!priorOpp && priorTest) { priorStopPtT = priorPtT = priorTest->ptT(); while ((priorPtT = priorPtT->next()) != priorStopPtT) { + if (priorPtT->deleted()) { + continue; + } SkOpSegment* segment = priorPtT->span()->segment(); if (segment == opp) { prior = priorTest; @@ -1203,7 +1209,8 @@ void SkOpSegment::missingCoincidence(SkOpCoincidence* coincidences, SkChunkAlloc } if (coincident) { // mark coincidence - if (!coincidences->extend(priorPtT, ptT, oppStart, oppEnd)) { + if (!coincidences->extend(priorPtT, ptT, oppStart, oppEnd) + && !coincidences->extend(oppStart, oppEnd, priorPtT, ptT)) { coincidences->add(priorPtT, ptT, oppStart, oppEnd, allocator); } clear_visited(&fHead); |