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

Unified Diff: src/pathops/SkOpCoincidence.cpp

Issue 1250293002: fix path ops fuzz buster (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: corrupting bug kaput Created 5 years, 5 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/SkOpBuilder.cpp ('k') | src/pathops/SkOpContour.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkOpCoincidence.cpp
diff --git a/src/pathops/SkOpCoincidence.cpp b/src/pathops/SkOpCoincidence.cpp
index 58ff7f3ab9b7552408b00192306378aadf40826b..46d06e9e0b3d5ef831dbbb9b1fdc9ee0a02bac18 100755
--- a/src/pathops/SkOpCoincidence.cpp
+++ b/src/pathops/SkOpCoincidence.cpp
@@ -568,6 +568,16 @@ void SkOpCoincidence::fixAligned() {
coin->fOppPtTEnd = coin->fOppPtTEnd->doppelganger();
}
} while ((coin = coin->fNext));
+ coin = fHead;
+ SkCoincidentSpans** priorPtr = &fHead;
+ do {
+ if (coin->fCoinPtTStart->collapsed(coin->fCoinPtTEnd)
+ || coin->fOppPtTStart->collapsed(coin->fOppPtTEnd)) {
+ *priorPtr = coin->fNext;
+ continue;
+ }
+ priorPtr = &coin->fNext;
+ } while ((coin = coin->fNext));
}
void SkOpCoincidence::fixUp(SkOpPtT* deleted, SkOpPtT* kept) {
« no previous file with comments | « src/pathops/SkOpBuilder.cpp ('k') | src/pathops/SkOpContour.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698