| 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 "SkIntersections.h" | 7 #include "SkIntersections.h" |
| 8 #include "SkOpSegment.h" | 8 #include "SkOpSegment.h" |
| 9 #include "SkPathWriter.h" | 9 #include "SkPathWriter.h" |
| 10 #include "SkTSort.h" | 10 #include "SkTSort.h" |
| (...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2230 SkOpSegment* SkOpSegment::nextChase(int* index, const int step, int* min, SkOpSp
an** last) { | 2230 SkOpSegment* SkOpSegment::nextChase(int* index, const int step, int* min, SkOpSp
an** last) { |
| 2231 int end = nextExactSpan(*index, step); | 2231 int end = nextExactSpan(*index, step); |
| 2232 SkASSERT(end >= 0); | 2232 SkASSERT(end >= 0); |
| 2233 if (multipleSpans(end)) { | 2233 if (multipleSpans(end)) { |
| 2234 *last = &fTs[end]; | 2234 *last = &fTs[end]; |
| 2235 return NULL; | 2235 return NULL; |
| 2236 } | 2236 } |
| 2237 const SkOpSpan& endSpan = fTs[end]; | 2237 const SkOpSpan& endSpan = fTs[end]; |
| 2238 SkOpSegment* other = endSpan.fOther; | 2238 SkOpSegment* other = endSpan.fOther; |
| 2239 *index = endSpan.fOtherIndex; | 2239 *index = endSpan.fOtherIndex; |
| 2240 SkASSERT(index >= 0); | 2240 SkASSERT(*index >= 0); |
| 2241 int otherEnd = other->nextExactSpan(*index, step); | 2241 int otherEnd = other->nextExactSpan(*index, step); |
| 2242 SkASSERT(otherEnd >= 0); | 2242 SkASSERT(otherEnd >= 0); |
| 2243 *min = SkMin32(*index, otherEnd); | 2243 *min = SkMin32(*index, otherEnd); |
| 2244 return other; | 2244 return other; |
| 2245 } | 2245 } |
| 2246 | 2246 |
| 2247 // This has callers for two different situations: one establishes the end | 2247 // This has callers for two different situations: one establishes the end |
| 2248 // of the current span, and one establishes the beginning of the next span | 2248 // of the current span, and one establishes the beginning of the next span |
| 2249 // (thus the name). When this is looking for the end of the current span, | 2249 // (thus the name). When this is looking for the end of the current span, |
| 2250 // coincidence is found when the beginning Ts contain -step and the end | 2250 // coincidence is found when the beginning Ts contain -step and the end |
| (...skipping 539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2790 sum += fTs[i].fWindValue; | 2790 sum += fTs[i].fWindValue; |
| 2791 slots[fTs[i].fOther->fID - 1] = as_digit(fTs[i].fWindValue); | 2791 slots[fTs[i].fOther->fID - 1] = as_digit(fTs[i].fWindValue); |
| 2792 sum += fTs[i].fOppValue; | 2792 sum += fTs[i].fOppValue; |
| 2793 slots[slotCount + fTs[i].fOther->fID - 1] = as_digit(fTs[i].fOppValue); | 2793 slots[slotCount + fTs[i].fOther->fID - 1] = as_digit(fTs[i].fOppValue); |
| 2794 } | 2794 } |
| 2795 SkDebugf("%s id=%2d %.*s | %.*s\n", __FUNCTION__, fID, slotCount, slots.begi
n(), slotCount, | 2795 SkDebugf("%s id=%2d %.*s | %.*s\n", __FUNCTION__, fID, slotCount, slots.begi
n(), slotCount, |
| 2796 slots.begin() + slotCount); | 2796 slots.begin() + slotCount); |
| 2797 return sum; | 2797 return sum; |
| 2798 } | 2798 } |
| 2799 #endif | 2799 #endif |
| OLD | NEW |