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

Unified Diff: src/pathops/SkPathOpsCommon.cpp

Issue 2321773002: pathops tiger checkpoint (Closed)
Patch Set: checkpoint (all not-under-development tests work) Created 4 years, 3 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/SkOpSpan.cpp ('k') | src/pathops/SkPathOpsDebug.h » ('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 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;
« no previous file with comments | « src/pathops/SkOpSpan.cpp ('k') | src/pathops/SkPathOpsDebug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698