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

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

Issue 2058773002: add fail condition to addexpanded (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove debug change Created 4 years, 6 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 | 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 2015 Google Inc. 2 * Copyright 2015 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 "SkOpCoincidence.h" 7 #include "SkOpCoincidence.h"
8 #include "SkOpSegment.h" 8 #include "SkOpSegment.h"
9 #include "SkPathOpsTSect.h" 9 #include "SkPathOpsTSect.h"
10 10
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 } 129 }
130 // start over 130 // start over
131 test = start; 131 test = start;
132 oTest = oStart; 132 oTest = oStart;
133 } 133 }
134 if (test != end) { 134 if (test != end) {
135 test = test->upCast()->next(); 135 test = test->upCast()->next();
136 } 136 }
137 if (oTest != oEnd) { 137 if (oTest != oEnd) {
138 oTest = coin->fFlipped ? oTest->prev() : oTest->upCast()->next() ; 138 oTest = coin->fFlipped ? oTest->prev() : oTest->upCast()->next() ;
139 if (!oTest) {
140 return false;
141 }
139 } 142 }
140 } 143 }
141 } while ((coin = coin->fNext)); 144 } while ((coin = coin->fNext));
142 #if DEBUG_VALIDATE 145 #if DEBUG_VALIDATE
143 globalState->setPhase(SkOpGlobalState::kWalking); 146 globalState->setPhase(SkOpGlobalState::kWalking);
144 #endif 147 #endif
145 return true; 148 return true;
146 } 149 }
147 150
148 bool SkOpCoincidence::addIfMissing(const SkCoincidentSpans* outer, SkOpPtT* over 1s, 151 bool SkOpCoincidence::addIfMissing(const SkCoincidentSpans* outer, SkOpPtT* over 1s,
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
686 *overS = SkTMax(SkTMin(coin1s->fT, coin1e->fT), SkTMin(coin2s->fT, coin2e->f T)); 689 *overS = SkTMax(SkTMin(coin1s->fT, coin1e->fT), SkTMin(coin2s->fT, coin2e->f T));
687 *overE = SkTMin(SkTMax(coin1s->fT, coin1e->fT), SkTMax(coin2s->fT, coin2e->f T)); 690 *overE = SkTMin(SkTMax(coin1s->fT, coin1e->fT), SkTMax(coin2s->fT, coin2e->f T));
688 return *overS < *overE; 691 return *overS < *overE;
689 } 692 }
690 693
691 bool SkOpCoincidence::testForCoincidence(const SkCoincidentSpans* outer, const S kOpPtT* testS, 694 bool SkOpCoincidence::testForCoincidence(const SkCoincidentSpans* outer, const S kOpPtT* testS,
692 const SkOpPtT* testE) const { 695 const SkOpPtT* testE) const {
693 return testS->segment()->testForCoincidence(testS, testE, testS->span(), 696 return testS->segment()->testForCoincidence(testS, testE, testS->span(),
694 testE->span(), outer->fCoinPtTStart->segment(), 120000); // FIXME: replace with tuned 697 testE->span(), outer->fCoinPtTStart->segment(), 120000); // FIXME: replace with tuned
695 } 698 }
OLDNEW
« no previous file with comments | « no previous file | tests/PathOpsBuilderTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698