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 1149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1160 // the resulting run from point 1 to point 2 is coincident on A and B. | 1160 // the resulting run from point 1 to point 2 is coincident on A and B. |
1161 bool SkOpSegment::missingCoincidence() { | 1161 bool SkOpSegment::missingCoincidence() { |
1162 if (this->done()) { | 1162 if (this->done()) { |
1163 return false; | 1163 return false; |
1164 } | 1164 } |
1165 SkOpSpan* prior = nullptr; | 1165 SkOpSpan* prior = nullptr; |
1166 SkOpSpanBase* spanBase = &fHead; | 1166 SkOpSpanBase* spanBase = &fHead; |
1167 bool result = false; | 1167 bool result = false; |
1168 do { | 1168 do { |
1169 SkOpPtT* ptT = spanBase->ptT(), * spanStopPtT = ptT; | 1169 SkOpPtT* ptT = spanBase->ptT(), * spanStopPtT = ptT; |
1170 SkASSERT(ptT->span() == spanBase); | 1170 SkOPASSERT(ptT->span() == spanBase); |
1171 while ((ptT = ptT->next()) != spanStopPtT) { | 1171 while ((ptT = ptT->next()) != spanStopPtT) { |
1172 if (ptT->deleted()) { | 1172 if (ptT->deleted()) { |
1173 continue; | 1173 continue; |
1174 } | 1174 } |
1175 SkOpSegment* opp = ptT->span()->segment(); | 1175 SkOpSegment* opp = ptT->span()->segment(); |
1176 if (opp->done()) { | 1176 if (opp->done()) { |
1177 continue; | 1177 continue; |
1178 } | 1178 } |
1179 // when opp is encounted the 1st time, continue; on 2nd encounter, l
ook for coincidence | 1179 // when opp is encounted the 1st time, continue; on 2nd encounter, l
ook for coincidence |
1180 if (!opp->visited()) { | 1180 if (!opp->visited()) { |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1806 int absOut = SkTAbs(outerWinding); | 1806 int absOut = SkTAbs(outerWinding); |
1807 int absIn = SkTAbs(innerWinding); | 1807 int absIn = SkTAbs(innerWinding); |
1808 bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn; | 1808 bool result = absOut == absIn ? outerWinding < 0 : absOut < absIn; |
1809 return result; | 1809 return result; |
1810 } | 1810 } |
1811 | 1811 |
1812 int SkOpSegment::windSum(const SkOpAngle* angle) const { | 1812 int SkOpSegment::windSum(const SkOpAngle* angle) const { |
1813 const SkOpSpan* minSpan = angle->start()->starter(angle->end()); | 1813 const SkOpSpan* minSpan = angle->start()->starter(angle->end()); |
1814 return minSpan->windSum(); | 1814 return minSpan->windSum(); |
1815 } | 1815 } |
OLD | NEW |