Index: src/pathops/SkAddIntersections.cpp |
diff --git a/src/pathops/SkAddIntersections.cpp b/src/pathops/SkAddIntersections.cpp |
index 52e751bd08d0129825b3cf0c097c3343d942a521..27422eda5f012a85e7381f866579a8a9a1d00f0e 100644 |
--- a/src/pathops/SkAddIntersections.cpp |
+++ b/src/pathops/SkAddIntersections.cpp |
@@ -434,7 +434,7 @@ void AddSelfIntersectTs(SkOpContour* test) { |
// resolve any coincident pairs found while intersecting, and |
// see if coincidence is formed by clipping non-concident segments |
-void CoincidenceCheck(SkTArray<SkOpContour*, true>* contourList, int total) { |
+bool CoincidenceCheck(SkTArray<SkOpContour*, true>* contourList, int total) { |
int contourCount = (*contourList).count(); |
for (int cIndex = 0; cIndex < contourCount; ++cIndex) { |
SkOpContour* contour = (*contourList)[cIndex]; |
@@ -446,10 +446,13 @@ void CoincidenceCheck(SkTArray<SkOpContour*, true>* contourList, int total) { |
} |
for (int cIndex = 0; cIndex < contourCount; ++cIndex) { |
SkOpContour* contour = (*contourList)[cIndex]; |
- contour->calcCoincidentWinding(); |
+ if (!contour->calcCoincidentWinding()) { |
+ return false; |
+ } |
} |
for (int cIndex = 0; cIndex < contourCount; ++cIndex) { |
SkOpContour* contour = (*contourList)[cIndex]; |
contour->calcPartialCoincidentWinding(); |
} |
+ return true; |
} |