| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 | 7 |
| 8 #include "SkPathOpsDebug.h" | 8 #include "SkPathOpsDebug.h" |
| 9 #include "SkPath.h" | 9 #include "SkPath.h" |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 } | 97 } |
| 98 #endif | 98 #endif |
| 99 | 99 |
| 100 #endif // defined SK_DEBUG || !FORCE_RELEASE | 100 #endif // defined SK_DEBUG || !FORCE_RELEASE |
| 101 | 101 |
| 102 #include "SkOpAngle.h" | 102 #include "SkOpAngle.h" |
| 103 #include "SkOpSegment.h" | 103 #include "SkOpSegment.h" |
| 104 | 104 |
| 105 #if DEBUG_SORT | 105 #if DEBUG_SORT |
| 106 void SkOpAngle::debugLoop() const { | 106 void SkOpAngle::debugLoop() const { |
| 107 dumpLoop(); | 107 const SkOpAngle* first = this; |
| 108 const SkOpAngle* next = this; |
| 109 do { |
| 110 next->dumpOne(true); |
| 111 next = next->fNext; |
| 112 } while (next && next != first); |
| 108 } | 113 } |
| 109 #endif | 114 #endif |
| 110 | 115 |
| 111 #if DEBUG_ANGLE | 116 #if DEBUG_ANGLE |
| 112 void SkOpAngle::debugSameAs(const SkOpAngle* compare) const { | 117 void SkOpAngle::debugSameAs(const SkOpAngle* compare) const { |
| 113 SK_ALWAYSBREAK(fSegment == compare->fSegment); | 118 SK_ALWAYSBREAK(fSegment == compare->fSegment); |
| 114 const SkOpSpan& startSpan = fSegment->span(fStart); | 119 const SkOpSpan& startSpan = fSegment->span(fStart); |
| 115 const SkOpSpan& oStartSpan = fSegment->span(compare->fStart); | 120 const SkOpSpan& oStartSpan = fSegment->span(compare->fStart); |
| 116 SK_ALWAYSBREAK(startSpan.fToAngle == oStartSpan.fToAngle); | 121 SK_ALWAYSBREAK(startSpan.fToAngle == oStartSpan.fToAngle); |
| 117 SK_ALWAYSBREAK(startSpan.fFromAngle == oStartSpan.fFromAngle); | 122 SK_ALWAYSBREAK(startSpan.fFromAngle == oStartSpan.fFromAngle); |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 551 } | 556 } |
| 552 last = &span; | 557 last = &span; |
| 553 hasLoop |= last->fLoop; | 558 hasLoop |= last->fLoop; |
| 554 } | 559 } |
| 555 SK_ALWAYSBREAK(done == fDoneSpans); | 560 SK_ALWAYSBREAK(done == fDoneSpans); |
| 556 // if (fAngles.count() ) { | 561 // if (fAngles.count() ) { |
| 557 // fAngles.begin()->debugValidateLoop(); | 562 // fAngles.begin()->debugValidateLoop(); |
| 558 // } | 563 // } |
| 559 #endif | 564 #endif |
| 560 } | 565 } |
| OLD | NEW |