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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1209 oOppValue += oppValue; | 1209 oOppValue += oppValue; |
1210 } | 1210 } |
1211 if (oSegment->isXor()) { | 1211 if (oSegment->isXor()) { |
1212 oWindValue &= 1; | 1212 oWindValue &= 1; |
1213 } | 1213 } |
1214 if (oSegment->oppXor()) { | 1214 if (oSegment->oppXor()) { |
1215 oOppValue &= 1; | 1215 oOppValue &= 1; |
1216 } | 1216 } |
1217 windValue = oppValue = 0; | 1217 windValue = oppValue = 0; |
1218 } | 1218 } |
1219 #if DEBUG_COINCIDENCE | 1219 #if 0 && DEBUG_COINCIDENCE |
1220 SkDebugf("seg=%d span=%d windValue=%d oppValue=%d\n", segment->debug
ID(), | 1220 SkDebugf("seg=%d span=%d windValue=%d oppValue=%d\n", segment->debug
ID(), |
1221 start->debugID(), windValue, oppValue); | 1221 start->debugID(), windValue, oppValue); |
1222 SkDebugf("seg=%d span=%d windValue=%d oppValue=%d\n", oSegment->debu
gID(), | 1222 SkDebugf("seg=%d span=%d windValue=%d oppValue=%d\n", oSegment->debu
gID(), |
1223 oStart->debugID(), oWindValue, oOppValue); | 1223 oStart->debugID(), oWindValue, oOppValue); |
1224 #endif | 1224 #endif |
1225 start->setWindValue(windValue); | 1225 start->setWindValue(windValue); |
1226 start->setOppValue(oppValue); | 1226 start->setOppValue(oppValue); |
1227 oStart->setWindValue(oWindValue); | 1227 oStart->setWindValue(oWindValue); |
1228 oStart->setOppValue(oOppValue); | 1228 oStart->setOppValue(oOppValue); |
1229 if (!windValue && !oppValue) { | 1229 if (!windValue && !oppValue) { |
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1607 this->release(fHead, coin); | 1607 this->release(fHead, coin); |
1608 } | 1608 } |
1609 } while ((coin = coin->next())); | 1609 } while ((coin = coin->next())); |
1610 } | 1610 } |
1611 | 1611 |
1612 bool SkOpCoincidence::testForCoincidence(const SkCoincidentSpans* outer, const S
kOpPtT* testS, | 1612 bool SkOpCoincidence::testForCoincidence(const SkCoincidentSpans* outer, const S
kOpPtT* testS, |
1613 const SkOpPtT* testE) const { | 1613 const SkOpPtT* testE) const { |
1614 return testS->segment()->testForCoincidence(testS, testE, testS->span(), | 1614 return testS->segment()->testForCoincidence(testS, testE, testS->span(), |
1615 testE->span(), outer->coinPtTStart()->segment()); | 1615 testE->span(), outer->coinPtTStart()->segment()); |
1616 } | 1616 } |
OLD | NEW |