| 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 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 } | 357 } |
| 358 useXor = op ? isXor : oppXor; | 358 useXor = op ? isXor : oppXor; |
| 359 SkASSERT(lastOppXor == -1 || lastOppXor == (int) useXor); | 359 SkASSERT(lastOppXor == -1 || lastOppXor == (int) useXor); |
| 360 lastOppXor = (int) useXor; | 360 lastOppXor = (int) useXor; |
| 361 opp += next->debugSign() * (op ? minSpan->windValue() : minSpan->oppValu
e()); | 361 opp += next->debugSign() * (op ? minSpan->windValue() : minSpan->oppValu
e()); |
| 362 if (useXor) { | 362 if (useXor) { |
| 363 opp &= 1; | 363 opp &= 1; |
| 364 } | 364 } |
| 365 next = next->fNext; | 365 next = next->fNext; |
| 366 } while (next && next != first); | 366 } while (next && next != first); |
| 367 SkASSERT(wind == 0); | 367 SkASSERT(wind == 0 || !FLAGS_runFail); |
| 368 SkASSERT(opp == 0 || !FLAGS_runFail); | 368 SkASSERT(opp == 0 || !FLAGS_runFail); |
| 369 #endif | 369 #endif |
| 370 } | 370 } |
| 371 | 371 |
| 372 void SkOpAngle::debugValidateNext() const { | 372 void SkOpAngle::debugValidateNext() const { |
| 373 #if !FORCE_RELEASE | 373 #if !FORCE_RELEASE |
| 374 const SkOpAngle* first = this; | 374 const SkOpAngle* first = this; |
| 375 const SkOpAngle* next = first; | 375 const SkOpAngle* next = first; |
| 376 SkTDArray<const SkOpAngle*>(angles); | 376 SkTDArray<const SkOpAngle*>(angles); |
| 377 do { | 377 do { |
| (...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 653 #endif | 653 #endif |
| 654 SkPath::FillType fillType = path.getFillType(); | 654 SkPath::FillType fillType = path.getFillType(); |
| 655 SkASSERT(fillType >= SkPath::kWinding_FillType && fillType <= SkPath::kInver
seEvenOdd_FillType); | 655 SkASSERT(fillType >= SkPath::kWinding_FillType && fillType <= SkPath::kInver
seEvenOdd_FillType); |
| 656 if (includeDeclaration) { | 656 if (includeDeclaration) { |
| 657 SkDebugf(" SkPath %s;\n", name); | 657 SkDebugf(" SkPath %s;\n", name); |
| 658 } | 658 } |
| 659 SkDebugf(" %s.setFillType(SkPath::%s);\n", name, gFillTypeStr[fillType]); | 659 SkDebugf(" %s.setFillType(SkPath::%s);\n", name, gFillTypeStr[fillType]); |
| 660 iter.setPath(path); | 660 iter.setPath(path); |
| 661 showPathContours(iter, name); | 661 showPathContours(iter, name); |
| 662 } | 662 } |
| OLD | NEW |