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

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

Issue 2275703003: remove point aliases (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 3 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 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 } 498 }
499 #if DEBUG_T_SECT_LOOP_COUNT 499 #if DEBUG_T_SECT_LOOP_COUNT
500 test->globalState()->debugAddLoopCount(&ts, wt, wn); 500 test->globalState()->debugAddLoopCount(&ts, wt, wn);
501 #endif 501 #endif
502 int coinIndex = -1; 502 int coinIndex = -1;
503 SkOpPtT* coinPtT[2]; 503 SkOpPtT* coinPtT[2];
504 for (int pt = 0; pt < pts; ++pt) { 504 for (int pt = 0; pt < pts; ++pt) {
505 SkASSERT(ts[0][pt] >= 0 && ts[0][pt] <= 1); 505 SkASSERT(ts[0][pt] >= 0 && ts[0][pt] <= 1);
506 SkASSERT(ts[1][pt] >= 0 && ts[1][pt] <= 1); 506 SkASSERT(ts[1][pt] >= 0 && ts[1][pt] <= 1);
507 wt.segment()->debugValidate(); 507 wt.segment()->debugValidate();
508 SkOpPtT* testTAt = wt.segment()->addT(ts[swap][pt], SkOpSegment: :kAllowAliasMatch, 508 SkOpPtT* testTAt = wt.segment()->addT(ts[swap][pt], nullptr);
509 nullptr);
510 wn.segment()->debugValidate(); 509 wn.segment()->debugValidate();
511 SkOpPtT* nextTAt = wn.segment()->addT(ts[!swap][pt], SkOpSegment ::kAllowAliasMatch, 510 SkOpPtT* nextTAt = wn.segment()->addT(ts[!swap][pt], nullptr);
512 nullptr);
513 if (testTAt->addOpp(nextTAt)) { 511 if (testTAt->addOpp(nextTAt)) {
514 testTAt->span()->checkForCollapsedCoincidence(); 512 testTAt->span()->checkForCollapsedCoincidence();
515 } 513 }
516 if (testTAt->fPt != nextTAt->fPt) { 514 if (testTAt->fPt != nextTAt->fPt) {
517 testTAt->span()->unaligned(); 515 testTAt->span()->unaligned();
518 nextTAt->span()->unaligned(); 516 nextTAt->span()->unaligned();
519 } 517 }
520 wt.segment()->debugValidate(); 518 wt.segment()->debugValidate();
521 wn.segment()->debugValidate(); 519 wn.segment()->debugValidate();
522 if (!ts.isCoincident(pt)) { 520 if (!ts.isCoincident(pt)) {
(...skipping 21 matching lines...) Expand all
544 coincidence->add(coinPtT[0], testTAt, coinPtT[1], nextTAt); 542 coincidence->add(coinPtT[0], testTAt, coinPtT[1], nextTAt);
545 wt.segment()->debugValidate(); 543 wt.segment()->debugValidate();
546 wn.segment()->debugValidate(); 544 wn.segment()->debugValidate();
547 coinIndex = -1; 545 coinIndex = -1;
548 } 546 }
549 SkASSERT(coinIndex < 0); // expect coincidence to be paired 547 SkASSERT(coinIndex < 0); // expect coincidence to be paired
550 } while (wn.advance()); 548 } while (wn.advance());
551 } while (wt.advance()); 549 } while (wt.advance());
552 return true; 550 return true;
553 } 551 }
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