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

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

Issue 1129863007: look for deleted pts when detecting line/curve coincident edges (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix path op builder Created 5 years, 7 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/SkOpSegment.cpp ('k') | tests/PathOpsBuilderTest.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 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
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
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 }
OLDNEW
« no previous file with comments | « src/pathops/SkOpSegment.cpp ('k') | tests/PathOpsBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698