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

Unified Diff: src/pathops/SkOpSegment.cpp

Issue 1129863007: look for deleted pts when detecting line/curve coincident edges (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix path op builder Created 5 years, 7 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/SkOpCoincidence.cpp ('k') | src/pathops/SkPathOpsDebug.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpSegment.cpp
diff --git a/src/pathops/SkOpSegment.cpp b/src/pathops/SkOpSegment.cpp
index 01417d6b8f492257c8bca934e1a55dc756320a5a..8bd0f03518b5593646f15ccedb8f11830cc0e30e 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);
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | src/pathops/SkPathOpsDebug.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698