| 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 21 matching lines...) Expand all Loading... |
| 32 if (fPt != check->fPt) { | 32 if (fPt != check->fPt) { |
| 33 return false; | 33 return false; |
| 34 } | 34 } |
| 35 SkASSERT(this != check); | 35 SkASSERT(this != check); |
| 36 const SkOpSegment* segment = this->segment(); | 36 const SkOpSegment* segment = this->segment(); |
| 37 SkASSERT(segment == check->segment()); | 37 SkASSERT(segment == check->segment()); |
| 38 return segment->collapsed(); | 38 return segment->collapsed(); |
| 39 } | 39 } |
| 40 | 40 |
| 41 bool SkOpPtT::contains(const SkOpPtT* check) const { | 41 bool SkOpPtT::contains(const SkOpPtT* check) const { |
| 42 SkASSERT(this != check); | 42 SkOPASSERT(this != check); |
| 43 const SkOpPtT* ptT = this; | 43 const SkOpPtT* ptT = this; |
| 44 const SkOpPtT* stopPtT = ptT; | 44 const SkOpPtT* stopPtT = ptT; |
| 45 while ((ptT = ptT->next()) != stopPtT) { | 45 while ((ptT = ptT->next()) != stopPtT) { |
| 46 if (ptT == check) { | 46 if (ptT == check) { |
| 47 return true; | 47 return true; |
| 48 } | 48 } |
| 49 } | 49 } |
| 50 return false; | 50 return false; |
| 51 } | 51 } |
| 52 | 52 |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 528 | 528 |
| 529 void SkOpSpan::setWindSum(int windSum) { | 529 void SkOpSpan::setWindSum(int windSum) { |
| 530 SkASSERT(!final()); | 530 SkASSERT(!final()); |
| 531 if (fWindSum != SK_MinS32 && fWindSum != windSum) { | 531 if (fWindSum != SK_MinS32 && fWindSum != windSum) { |
| 532 this->globalState()->setWindingFailed(); | 532 this->globalState()->setWindingFailed(); |
| 533 return; | 533 return; |
| 534 } | 534 } |
| 535 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM); | 535 SkASSERT(!DEBUG_LIMIT_WIND_SUM || SkTAbs(windSum) <= DEBUG_LIMIT_WIND_SUM); |
| 536 fWindSum = windSum; | 536 fWindSum = windSum; |
| 537 } | 537 } |
| OLD | NEW |