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

Side by Side Diff: src/pathops/SkPathOpsCommon.cpp

Issue 1854333002: give up if huge paths have unresolvable coincidence (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: give up if huge paths have unresolvable coincidences Created 4 years, 8 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 unified diff | Download patch
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "SkAddIntersections.h" 7 #include "SkAddIntersections.h"
8 #include "SkOpCoincidence.h" 8 #include "SkOpCoincidence.h"
9 #include "SkOpEdgeBuilder.h" 9 #include "SkOpEdgeBuilder.h"
10 #include "SkPathOpsCommon.h" 10 #include "SkPathOpsCommon.h"
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
487 #endif 487 #endif
488 // check to see if, loosely, coincident ranges may be expanded 488 // check to see if, loosely, coincident ranges may be expanded
489 if (coincidence->expand()) { 489 if (coincidence->expand()) {
490 DEBUG_COINCIDENCE_HEALTH(contourList, "expand1"); 490 DEBUG_COINCIDENCE_HEALTH(contourList, "expand1");
491 if (!coincidence->addExpanded(allocator PATH_OPS_DEBUG_VALIDATE_PARAMS( globalState))) { 491 if (!coincidence->addExpanded(allocator PATH_OPS_DEBUG_VALIDATE_PARAMS( globalState))) {
492 return false; 492 return false;
493 } 493 }
494 } 494 }
495 DEBUG_COINCIDENCE_HEALTH(contourList, "expand2"); 495 DEBUG_COINCIDENCE_HEALTH(contourList, "expand2");
496 // the expanded ranges may not align -- add the missing spans 496 // the expanded ranges may not align -- add the missing spans
497 coincidence->mark(); // mark spans of coincident segments as coincident 497 if (!coincidence->mark()) { // mark spans of coincident segments as coincid ent
498 return false;
499 }
498 DEBUG_COINCIDENCE_HEALTH(contourList, "mark1"); 500 DEBUG_COINCIDENCE_HEALTH(contourList, "mark1");
499 // look for coincidence missed earlier 501 // look for coincidence missed earlier
500 if (missingCoincidence(contourList, coincidence, allocator)) { 502 if (missingCoincidence(contourList, coincidence, allocator)) {
501 DEBUG_COINCIDENCE_HEALTH(contourList, "missingCoincidence1"); 503 DEBUG_COINCIDENCE_HEALTH(contourList, "missingCoincidence1");
502 (void) coincidence->expand(); 504 (void) coincidence->expand();
503 DEBUG_COINCIDENCE_HEALTH(contourList, "expand3"); 505 DEBUG_COINCIDENCE_HEALTH(contourList, "expand3");
504 if (!coincidence->addExpanded(allocator PATH_OPS_DEBUG_VALIDATE_PARAMS( globalState))) { 506 if (!coincidence->addExpanded(allocator PATH_OPS_DEBUG_VALIDATE_PARAMS( globalState))) {
505 return false; 507 return false;
506 } 508 }
507 DEBUG_COINCIDENCE_HEALTH(contourList, "addExpanded2"); 509 DEBUG_COINCIDENCE_HEALTH(contourList, "addExpanded2");
(...skipping 19 matching lines...) Expand all
527 if (!coincidence->apply()) { 529 if (!coincidence->apply()) {
528 return false; 530 return false;
529 } 531 }
530 } 532 }
531 #if DEBUG_ACTIVE_SPANS 533 #if DEBUG_ACTIVE_SPANS
532 coincidence->debugShowCoincidence(); 534 coincidence->debugShowCoincidence();
533 DebugShowActiveSpans(contourList); 535 DebugShowActiveSpans(contourList);
534 #endif 536 #endif
535 return true; 537 return true;
536 } 538 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpCoincidence.cpp ('k') | tests/PathOpsOpTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698