| 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 "SkOpEdgeBuilder.h" | 7 #include "SkOpEdgeBuilder.h" |
| 8 #include "SkPathOpsCommon.h" | 8 #include "SkPathOpsCommon.h" |
| 9 #include "SkPathWriter.h" | 9 #include "SkPathWriter.h" |
| 10 #include "SkTSort.h" | 10 #include "SkTSort.h" |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 break; | 337 break; |
| 338 } | 338 } |
| 339 oppContourWinding = rightAngleWinding(contourList, ¤t, indexPtr, e
ndIndexPtr, &tHit, | 339 oppContourWinding = rightAngleWinding(contourList, ¤t, indexPtr, e
ndIndexPtr, &tHit, |
| 340 &hitOppDx, &tryAgain, true); | 340 &hitOppDx, &tryAgain, true); |
| 341 } while (tryAgain); | 341 } while (tryAgain); |
| 342 current->initWinding(*indexPtr, *endIndexPtr, tHit, contourWinding, hitDx, o
ppContourWinding, | 342 current->initWinding(*indexPtr, *endIndexPtr, tHit, contourWinding, hitDx, o
ppContourWinding, |
| 343 hitOppDx); | 343 hitOppDx); |
| 344 return current; | 344 return current; |
| 345 } | 345 } |
| 346 | 346 |
| 347 void CheckEnds(SkTArray<SkOpContour*, true>* contourList) { |
| 348 // it's hard to determine if the end of a cubic or conic nearly intersects a
nother curve. |
| 349 // instead, look to see if the connecting curve intersected at that same end
. |
| 350 int contourCount = (*contourList).count(); |
| 351 for (int cTest = 0; cTest < contourCount; ++cTest) { |
| 352 SkOpContour* contour = (*contourList)[cTest]; |
| 353 contour->checkEnds(); |
| 354 } |
| 355 } |
| 356 |
| 347 void FixOtherTIndex(SkTArray<SkOpContour*, true>* contourList) { | 357 void FixOtherTIndex(SkTArray<SkOpContour*, true>* contourList) { |
| 348 int contourCount = (*contourList).count(); | 358 int contourCount = (*contourList).count(); |
| 349 for (int cTest = 0; cTest < contourCount; ++cTest) { | 359 for (int cTest = 0; cTest < contourCount; ++cTest) { |
| 350 SkOpContour* contour = (*contourList)[cTest]; | 360 SkOpContour* contour = (*contourList)[cTest]; |
| 351 contour->fixOtherTIndex(); | 361 contour->fixOtherTIndex(); |
| 352 } | 362 } |
| 353 } | 363 } |
| 354 | 364 |
| 355 void SortSegments(SkTArray<SkOpContour*, true>* contourList) { | 365 void SortSegments(SkTArray<SkOpContour*, true>* contourList) { |
| 356 int contourCount = (*contourList).count(); | 366 int contourCount = (*contourList).count(); |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 } | 585 } |
| 576 } | 586 } |
| 577 } while (rIndex < count); | 587 } while (rIndex < count); |
| 578 #if DEBUG_ASSEMBLE | 588 #if DEBUG_ASSEMBLE |
| 579 for (rIndex = 0; rIndex < count; ++rIndex) { | 589 for (rIndex = 0; rIndex < count; ++rIndex) { |
| 580 SkASSERT(sLink[rIndex] == SK_MaxS32); | 590 SkASSERT(sLink[rIndex] == SK_MaxS32); |
| 581 SkASSERT(eLink[rIndex] == SK_MaxS32); | 591 SkASSERT(eLink[rIndex] == SK_MaxS32); |
| 582 } | 592 } |
| 583 #endif | 593 #endif |
| 584 } | 594 } |
| OLD | NEW |