OLD | NEW |
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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
506 return false; | 506 return false; |
507 } | 507 } |
508 DEBUG_COINCIDENCE_HEALTH(contourList, "moveMultiples2"); | 508 DEBUG_COINCIDENCE_HEALTH(contourList, "moveMultiples2"); |
509 moveNearby(contourList); | 509 moveNearby(contourList); |
510 } | 510 } |
511 #if DEBUG_VALIDATE | 511 #if DEBUG_VALIDATE |
512 globalState->setPhase(SkOpGlobalState::kWalking); | 512 globalState->setPhase(SkOpGlobalState::kWalking); |
513 #endif | 513 #endif |
514 DEBUG_COINCIDENCE_HEALTH(contourList, "expand2"); | 514 DEBUG_COINCIDENCE_HEALTH(contourList, "expand2"); |
515 // the expanded ranges may not align -- add the missing spans | 515 // the expanded ranges may not align -- add the missing spans |
516 SkAssertResult(coincidence->addExpanded()); | 516 if (!coincidence->addExpanded()) { |
| 517 SkASSERT(globalState->debugSkipAssert()); |
| 518 return false; |
| 519 } |
517 DEBUG_COINCIDENCE_HEALTH(contourList, "addExpanded3"); | 520 DEBUG_COINCIDENCE_HEALTH(contourList, "addExpanded3"); |
518 coincidence->correctEnds(); | 521 coincidence->correctEnds(); |
519 if (!coincidence->mark()) { // mark spans of coincident segments as coincid
ent | 522 if (!coincidence->mark()) { // mark spans of coincident segments as coincid
ent |
520 return false; | 523 return false; |
521 } | 524 } |
522 DEBUG_COINCIDENCE_HEALTH(contourList, "mark1"); | 525 DEBUG_COINCIDENCE_HEALTH(contourList, "mark1"); |
523 // look for coincidence lines and curves undetected by intersection | 526 // look for coincidence lines and curves undetected by intersection |
524 if (missingCoincidence(contourList)) { | 527 if (missingCoincidence(contourList)) { |
525 #if DEBUG_VALIDATE | 528 #if DEBUG_VALIDATE |
526 globalState->setPhase(SkOpGlobalState::kIntersecting); | 529 globalState->setPhase(SkOpGlobalState::kIntersecting); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 } | 580 } |
578 #if DEBUG_COINCIDENCE_VERBOSE | 581 #if DEBUG_COINCIDENCE_VERBOSE |
579 coincidence->debugShowCoincidence(); | 582 coincidence->debugShowCoincidence(); |
580 #endif | 583 #endif |
581 #if DEBUG_COINCIDENCE | 584 #if DEBUG_COINCIDENCE |
582 coincidence->debugValidate(); | 585 coincidence->debugValidate(); |
583 #endif | 586 #endif |
584 SkPathOpsDebug::ShowActiveSpans(contourList); | 587 SkPathOpsDebug::ShowActiveSpans(contourList); |
585 return true; | 588 return true; |
586 } | 589 } |
OLD | NEW |