| Index: src/pathops/SkPathOpsCommon.cpp
|
| diff --git a/src/pathops/SkPathOpsCommon.cpp b/src/pathops/SkPathOpsCommon.cpp
|
| index c8ee84c54a2cee87f8d7745865616edf3b76c211..34895db23cdce75830dd882f318a040860c6d211 100644
|
| --- a/src/pathops/SkPathOpsCommon.cpp
|
| +++ b/src/pathops/SkPathOpsCommon.cpp
|
| @@ -483,7 +483,14 @@ bool HandleCoincidence(SkOpContourHead* contourList, SkOpCoincidence* coincidenc
|
| const int SAFETY_COUNT = 100; // FIXME: tune
|
| int safetyHatch = SAFETY_COUNT;
|
| // look for coincidence present in A-B and A-C but missing in B-C
|
| - while (coincidence->addMissing()) {
|
| + do {
|
| + bool added;
|
| + if (!coincidence->addMissing(&added)) {
|
| + return false;
|
| + }
|
| + if (!added) {
|
| + break;
|
| + }
|
| if (!--safetyHatch) {
|
| SkASSERT(globalState->debugSkipAssert());
|
| return false;
|
| @@ -491,7 +498,7 @@ bool HandleCoincidence(SkOpContourHead* contourList, SkOpCoincidence* coincidenc
|
| DEBUG_COINCIDENCE_HEALTH(contourList, "addMissing");
|
| moveNearby(contourList);
|
| DEBUG_COINCIDENCE_HEALTH(contourList, "moveNearby");
|
| - }
|
| + } while (true);
|
| DEBUG_COINCIDENCE_HEALTH(contourList, "addMissing2");
|
| // FIXME: only call this if addMissing modified something when returning false
|
| moveNearby(contourList);
|
| @@ -499,7 +506,10 @@ bool HandleCoincidence(SkOpContourHead* contourList, SkOpCoincidence* coincidenc
|
| // check to see if, loosely, coincident ranges may be expanded
|
| if (coincidence->expand()) {
|
| DEBUG_COINCIDENCE_HEALTH(contourList, "expand1");
|
| - coincidence->addMissing();
|
| + bool added;
|
| + if (!coincidence->addMissing(&added)) {
|
| + return false;
|
| + }
|
| DEBUG_COINCIDENCE_HEALTH(contourList, "addMissing2");
|
| if (!coincidence->addExpanded()) {
|
| return false;
|
|
|