| 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 #include "SkString.h" | 10 #include "SkString.h" |
| (...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 540 } | 540 } |
| 541 } | 541 } |
| 542 } | 542 } |
| 543 ++loop; | 543 ++loop; |
| 544 } while ((next = next->fNext) && next != this); | 544 } while ((next = next->fNext) && next != this); |
| 545 return 0; | 545 return 0; |
| 546 } | 546 } |
| 547 | 547 |
| 548 void SkOpPtT::debugValidate() const { | 548 void SkOpPtT::debugValidate() const { |
| 549 #if DEBUG_VALIDATE | 549 #if DEBUG_VALIDATE |
| 550 if (contour()->globalState()->phase() == SkOpGlobalState::kIntersecting) { | 550 SkOpGlobalState::Phase phase = contour()->globalState()->phase(); |
| 551 if (phase == SkOpGlobalState::kIntersecting |
| 552 || phase == SkOpGlobalState::kFixWinding) { |
| 551 return; | 553 return; |
| 552 } | 554 } |
| 553 SkASSERT(fNext); | 555 SkASSERT(fNext); |
| 554 SkASSERT(fNext != this); | 556 SkASSERT(fNext != this); |
| 555 SkASSERT(fNext->fNext); | 557 SkASSERT(fNext->fNext); |
| 556 SkASSERT(debugLoopLimit(false) == 0); | 558 SkASSERT(debugLoopLimit(false) == 0); |
| 557 #endif | 559 #endif |
| 558 } | 560 } |
| 559 | 561 |
| 560 static void output_scalar(SkScalar num) { | 562 static void output_scalar(SkScalar num) { |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 #endif | 655 #endif |
| 654 SkPath::FillType fillType = path.getFillType(); | 656 SkPath::FillType fillType = path.getFillType(); |
| 655 SkASSERT(fillType >= SkPath::kWinding_FillType && fillType <= SkPath::kInver
seEvenOdd_FillType); | 657 SkASSERT(fillType >= SkPath::kWinding_FillType && fillType <= SkPath::kInver
seEvenOdd_FillType); |
| 656 if (includeDeclaration) { | 658 if (includeDeclaration) { |
| 657 SkDebugf(" SkPath %s;\n", name); | 659 SkDebugf(" SkPath %s;\n", name); |
| 658 } | 660 } |
| 659 SkDebugf(" %s.setFillType(SkPath::%s);\n", name, gFillTypeStr[fillType]); | 661 SkDebugf(" %s.setFillType(SkPath::%s);\n", name, gFillTypeStr[fillType]); |
| 660 iter.setPath(path); | 662 iter.setPath(path); |
| 661 showPathContours(iter, name); | 663 showPathContours(iter, name); |
| 662 } | 664 } |
| OLD | NEW |