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 "SkOpSpan.h" | 7 #include "SkOpSpan.h" |
8 #include "SkPathOpsPoint.h" | 8 #include "SkPathOpsPoint.h" |
9 #include "SkPathWriter.h" | 9 #include "SkPathWriter.h" |
10 #include "SkTSort.h" | 10 #include "SkTSort.h" |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
299 sIndex < 0 ? ~sIndex : sIndex, eIndex < 0 ? 's' : 'e', | 299 sIndex < 0 ? ~sIndex : sIndex, eIndex < 0 ? 's' : 'e', |
300 eIndex < 0 ? ~eIndex : eIndex); | 300 eIndex < 0 ? ~eIndex : eIndex); |
301 #endif | 301 #endif |
302 do { | 302 do { |
303 const SkPath& contour = fPartials[rIndex]; | 303 const SkPath& contour = fPartials[rIndex]; |
304 if (forward) { | 304 if (forward) { |
305 fPathPtr->addPath(contour, | 305 fPathPtr->addPath(contour, |
306 first ? SkPath::kAppend_AddPathMode : SkPath::kExtend_Ad
dPathMode); | 306 first ? SkPath::kAppend_AddPathMode : SkPath::kExtend_Ad
dPathMode); |
307 } else { | 307 } else { |
308 SkASSERT(!first); | 308 SkASSERT(!first); |
309 fPathPtr->reversePathTo(contour); | 309 fPathPtr->reverseAddPath(contour); |
310 } | 310 } |
311 if (first) { | 311 if (first) { |
312 first = false; | 312 first = false; |
313 } | 313 } |
314 #if DEBUG_ASSEMBLE | 314 #if DEBUG_ASSEMBLE |
315 SkDebugf("%s rIndex=%d eIndex=%s%d close=%d\n", __FUNCTION__, rIndex
, | 315 SkDebugf("%s rIndex=%d eIndex=%s%d close=%d\n", __FUNCTION__, rIndex
, |
316 eIndex < 0 ? "~" : "", eIndex < 0 ? ~eIndex : eIndex, | 316 eIndex < 0 ? "~" : "", eIndex < 0 ? ~eIndex : eIndex, |
317 sIndex == ((rIndex != eIndex) ^ forward ? eIndex : ~eIndex)); | 317 sIndex == ((rIndex != eIndex) ^ forward ? eIndex : ~eIndex)); |
318 #endif | 318 #endif |
319 if (sIndex == ((rIndex != eIndex) ^ forward ? eIndex : ~eIndex)) { | 319 if (sIndex == ((rIndex != eIndex) ^ forward ? eIndex : ~eIndex)) { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
356 } | 356 } |
357 } while (rIndex < linkCount); | 357 } while (rIndex < linkCount); |
358 #if DEBUG_ASSEMBLE | 358 #if DEBUG_ASSEMBLE |
359 for (rIndex = 0; rIndex < linkCount; ++rIndex) { | 359 for (rIndex = 0; rIndex < linkCount; ++rIndex) { |
360 SkASSERT(sLink[rIndex] == SK_MaxS32); | 360 SkASSERT(sLink[rIndex] == SK_MaxS32); |
361 SkASSERT(eLink[rIndex] == SK_MaxS32); | 361 SkASSERT(eLink[rIndex] == SK_MaxS32); |
362 } | 362 } |
363 #endif | 363 #endif |
364 return; | 364 return; |
365 } | 365 } |
OLD | NEW |