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

Unified Diff: src/pathops/SkPathOpsCommon.cpp

Issue 1730293002: fix path ops fuzz bug (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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/SkOpSegment.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkPathOpsCommon.cpp
diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp
index 0060db2f30d3084930dae9a5836da4f452f7f59e..829f8a50d588f9507ea22ec0266a997c01a87d89 100644
--- a/src/pathops/SkPathOpsCommon.cpp
+++ b/src/pathops/SkPathOpsCommon.cpp
@@ -425,11 +425,14 @@ static bool missingCoincidence(SkOpContourHead* contourList,
return result;
}
-static void moveMultiples(SkOpContourHead* contourList) {
+static bool moveMultiples(SkOpContourHead* contourList) {
SkOpContour* contour = contourList;
do {
- contour->moveMultiples();
+ if (!contour->moveMultiples()) {
+ return false;
+ }
} while ((contour = contour->next()));
+ return true;
}
static void moveNearby(SkOpContourHead* contourList) {
@@ -451,7 +454,9 @@ bool HandleCoincidence(SkOpContourHead* contourList, SkOpCoincidence* coincidenc
SkOpGlobalState* globalState = contourList->globalState();
// combine t values when multiple intersections occur on some segments but not others
DEBUG_COINCIDENCE_HEALTH(contourList, "start");
- moveMultiples(contourList);
+ if (!moveMultiples(contourList)) {
+ return false;
+ }
DEBUG_COINCIDENCE_HEALTH(contourList, "moveMultiples");
findCollapsed(contourList);
DEBUG_COINCIDENCE_HEALTH(contourList, "findCollapsed");
« no previous file with comments | « src/pathops/SkOpSegment.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698