| OLD | NEW | 
|---|
| 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 "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 1040 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1051         otherEnd = next->end(); | 1051         otherEnd = next->end(); | 
| 1052     } | 1052     } | 
| 1053     if (!otherEnd) { | 1053     if (!otherEnd) { | 
| 1054         return nullptr; | 1054         return nullptr; | 
| 1055     } | 1055     } | 
| 1056     int foundStep = foundSpan->step(otherEnd); | 1056     int foundStep = foundSpan->step(otherEnd); | 
| 1057     if (*stepPtr != foundStep) { | 1057     if (*stepPtr != foundStep) { | 
| 1058         return set_last(last, endSpan); | 1058         return set_last(last, endSpan); | 
| 1059     } | 1059     } | 
| 1060     SkASSERT(*startPtr); | 1060     SkASSERT(*startPtr); | 
| 1061     if (!otherEnd) { |  | 
| 1062         return nullptr; |  | 
| 1063     } |  | 
| 1064 //    SkASSERT(otherEnd >= 0); | 1061 //    SkASSERT(otherEnd >= 0); | 
| 1065     SkOpSpan* origMin = step < 0 ? origStart->prev() : origStart->upCast(); | 1062     SkOpSpan* origMin = step < 0 ? origStart->prev() : origStart->upCast(); | 
| 1066     SkOpSpan* foundMin = foundSpan->starter(otherEnd); | 1063     SkOpSpan* foundMin = foundSpan->starter(otherEnd); | 
| 1067     if (foundMin->windValue() != origMin->windValue() | 1064     if (foundMin->windValue() != origMin->windValue() | 
| 1068             || foundMin->oppValue() != origMin->oppValue()) { | 1065             || foundMin->oppValue() != origMin->oppValue()) { | 
| 1069           return set_last(last, endSpan); | 1066           return set_last(last, endSpan); | 
| 1070     } | 1067     } | 
| 1071     *startPtr = foundSpan; | 1068     *startPtr = foundSpan; | 
| 1072     *stepPtr = foundStep; | 1069     *stepPtr = foundStep; | 
| 1073     if (minPtr) { | 1070     if (minPtr) { | 
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1688     int absOut = SkTAbs(outerWinding); | 1685     int absOut = SkTAbs(outerWinding); | 
| 1689     int absIn = SkTAbs(innerWinding); | 1686     int absIn = SkTAbs(innerWinding); | 
| 1690     bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn; | 1687     bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn; | 
| 1691     return result; | 1688     return result; | 
| 1692 } | 1689 } | 
| 1693 | 1690 | 
| 1694 int SkOpSegment::windSum(const SkOpAngle* angle) const { | 1691 int SkOpSegment::windSum(const SkOpAngle* angle) const { | 
| 1695     const SkOpSpan* minSpan = angle->start()->starter(angle->end()); | 1692     const SkOpSpan* minSpan = angle->start()->starter(angle->end()); | 
| 1696     return minSpan->windSum(); | 1693     return minSpan->windSum(); | 
| 1697 } | 1694 } | 
| OLD | NEW | 
|---|