OLD | NEW |
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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 } while ((outer = outer->next())); | 835 } while ((outer = outer->next())); |
836 this->restoreHead(); | 836 this->restoreHead(); |
837 return true; | 837 return true; |
838 } | 838 } |
839 | 839 |
840 bool SkOpCoincidence::addOverlap(const SkOpSegment* seg1, const SkOpSegment* seg
1o, | 840 bool SkOpCoincidence::addOverlap(const SkOpSegment* seg1, const SkOpSegment* seg
1o, |
841 const SkOpSegment* seg2, const SkOpSegment* seg2o, | 841 const SkOpSegment* seg2, const SkOpSegment* seg2o, |
842 const SkOpPtT* overS, const SkOpPtT* overE) { | 842 const SkOpPtT* overS, const SkOpPtT* overE) { |
843 const SkOpPtT* s1 = overS->find(seg1); | 843 const SkOpPtT* s1 = overS->find(seg1); |
844 const SkOpPtT* e1 = overE->find(seg1); | 844 const SkOpPtT* e1 = overE->find(seg1); |
| 845 FAIL_IF(!s1); |
845 FAIL_IF(!e1); | 846 FAIL_IF(!e1); |
846 if (!s1->starter(e1)->span()->upCast()->windValue()) { | 847 if (!s1->starter(e1)->span()->upCast()->windValue()) { |
847 s1 = overS->find(seg1o); | 848 s1 = overS->find(seg1o); |
848 e1 = overE->find(seg1o); | 849 e1 = overE->find(seg1o); |
849 FAIL_IF(!s1); | 850 FAIL_IF(!s1); |
850 FAIL_IF(!e1); | 851 FAIL_IF(!e1); |
851 if (!s1->starter(e1)->span()->upCast()->windValue()) { | 852 if (!s1->starter(e1)->span()->upCast()->windValue()) { |
852 return true; | 853 return true; |
853 } | 854 } |
854 } | 855 } |
(...skipping 505 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1360 } | 1361 } |
1361 do { | 1362 do { |
1362 if (coin->coinPtTStart()->segment() == deleted | 1363 if (coin->coinPtTStart()->segment() == deleted |
1363 || coin->coinPtTEnd()->segment() == deleted | 1364 || coin->coinPtTEnd()->segment() == deleted |
1364 || coin->oppPtTStart()->segment() == deleted | 1365 || coin->oppPtTStart()->segment() == deleted |
1365 || coin->oppPtTEnd()->segment() == deleted) { | 1366 || coin->oppPtTEnd()->segment() == deleted) { |
1366 this->release(fHead, coin); | 1367 this->release(fHead, coin); |
1367 } | 1368 } |
1368 } while ((coin = coin->next())); | 1369 } while ((coin = coin->next())); |
1369 } | 1370 } |
OLD | NEW |