OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkOpContour.h" | 8 #include "SkOpContour.h" |
9 #include "SkOpSegment.h" | 9 #include "SkOpSegment.h" |
10 #include "SkPathWriter.h" | 10 #include "SkPathWriter.h" |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 } | 231 } |
232 } | 232 } |
233 #if DEBUG_COINCIDENCE | 233 #if DEBUG_COINCIDENCE |
234 this->globalState()->coincidence()->debugValidate(); | 234 this->globalState()->coincidence()->debugValidate(); |
235 #endif | 235 #endif |
236 } | 236 } |
237 | 237 |
238 bool SkOpSpanBase::contains(const SkOpSpanBase* span) const { | 238 bool SkOpSpanBase::contains(const SkOpSpanBase* span) const { |
239 const SkOpPtT* start = &fPtT; | 239 const SkOpPtT* start = &fPtT; |
240 const SkOpPtT* check = &span->fPtT; | 240 const SkOpPtT* check = &span->fPtT; |
241 SkASSERT(start != check); | 241 SkOPASSERT(start != check); |
242 const SkOpPtT* walk = start; | 242 const SkOpPtT* walk = start; |
243 while ((walk = walk->next()) != start) { | 243 while ((walk = walk->next()) != start) { |
244 if (walk == check) { | 244 if (walk == check) { |
245 return true; | 245 return true; |
246 } | 246 } |
247 } | 247 } |
248 return false; | 248 return false; |
249 } | 249 } |
250 | 250 |
251 const SkOpPtT* SkOpSpanBase::contains(const SkOpSegment* segment) const { | 251 const SkOpPtT* SkOpSpanBase::contains(const SkOpSegment* segment) const { |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 | 448 |
449 void SkOpSpan::setWindSum(int windSum) { | 449 void SkOpSpan::setWindSum(int windSum) { |
450 SkASSERT(!final()); | 450 SkASSERT(!final()); |
451 if (fWindSum != SK_MinS32 && fWindSum != windSum) { | 451 if (fWindSum != SK_MinS32 && fWindSum != windSum) { |
452 this->globalState()->setWindingFailed(); | 452 this->globalState()->setWindingFailed(); |
453 return; | 453 return; |
454 } | 454 } |
455 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM); | 455 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM); |
456 fWindSum = windSum; | 456 fWindSum = windSum; |
457 } | 457 } |
OLD | NEW |