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

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

Issue 2357353002: split tight quads and cubics (Closed)
Patch Set: fix linux build Created 4 years, 2 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 | « no previous file | src/pathops/SkOpCoincidence.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 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 "SkPathOpsBounds.h" 9 #include "SkPathOpsBounds.h"
10 10
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 continue; 535 continue;
536 } 536 }
537 if (coinPtT[1]->span() == nextTAt->span()) { 537 if (coinPtT[1]->span() == nextTAt->span()) {
538 coinIndex = -1; // coincidence span collapsed 538 coinIndex = -1; // coincidence span collapsed
539 continue; 539 continue;
540 } 540 }
541 if (swap) { 541 if (swap) {
542 SkTSwap(coinPtT[0], coinPtT[1]); 542 SkTSwap(coinPtT[0], coinPtT[1]);
543 SkTSwap(testTAt, nextTAt); 543 SkTSwap(testTAt, nextTAt);
544 } 544 }
545 SkASSERT(coinPtT[0]->span()->t() < testTAt->span()->t()); 545 SkASSERT(coincidence->globalState()->debugSkipAssert()
546 || coinPtT[0]->span()->t() < testTAt->span()->t());
546 if (coinPtT[0]->span()->deleted()) { 547 if (coinPtT[0]->span()->deleted()) {
547 coinIndex = -1; 548 coinIndex = -1;
548 continue; 549 continue;
549 } 550 }
550 if (testTAt->span()->deleted()) { 551 if (testTAt->span()->deleted()) {
551 coinIndex = -1; 552 coinIndex = -1;
552 continue; 553 continue;
553 } 554 }
554 coincidence->add(coinPtT[0], testTAt, coinPtT[1], nextTAt); 555 coincidence->add(coinPtT[0], testTAt, coinPtT[1], nextTAt);
555 wt.segment()->debugValidate(); 556 wt.segment()->debugValidate();
556 wn.segment()->debugValidate(); 557 wn.segment()->debugValidate();
557 coinIndex = -1; 558 coinIndex = -1;
558 } 559 }
559 SkASSERT(coinIndex < 0); // expect coincidence to be paired 560 SkASSERT(coinIndex < 0); // expect coincidence to be paired
560 } while (wn.advance()); 561 } while (wn.advance());
561 } while (wt.advance()); 562 } while (wt.advance());
562 return true; 563 return true;
563 } 564 }
OLDNEW
« no previous file with comments | « no previous file | src/pathops/SkOpCoincidence.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698