Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Side by Side Diff: src/pathops/SkPathOpsCommon.cpp

Issue 19183003: path ops near exact (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: remove unused static function Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/pathops/SkPathOpsCommon.h ('k') | src/pathops/SkPathOpsDebug.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
337 break; 337 break;
338 } 338 }
339 oppContourWinding = rightAngleWinding(contourList, &current, indexPtr, e ndIndexPtr, &tHit, 339 oppContourWinding = rightAngleWinding(contourList, &current, 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
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 }
OLDNEW
« no previous file with comments | « src/pathops/SkPathOpsCommon.h ('k') | src/pathops/SkPathOpsDebug.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698