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

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

Issue 16951017: convert pathops to use SkSTArray where possible. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: pathops use SkTArray Created 7 years, 6 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/SkAddIntersections.h ('k') | src/pathops/SkDCubicIntersection.cpp » ('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 "SkAddIntersections.h" 7 #include "SkAddIntersections.h"
8 #include "SkPathOpsBounds.h" 8 #include "SkPathOpsBounds.h"
9 9
10 #if DEBUG_ADD_INTERSECTING_TS 10 #if DEBUG_ADD_INTERSECTING_TS
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 SkPoint point = ts.pt(0).asSkPoint(); 406 SkPoint point = ts.pt(0).asSkPoint();
407 int testTAt = wt.addSelfT(wt, point, ts[0][0]); 407 int testTAt = wt.addSelfT(wt, point, ts[0][0]);
408 int nextTAt = wt.addT(wt, point, ts[1][0]); 408 int nextTAt = wt.addT(wt, point, ts[1][0]);
409 wt.addOtherT(testTAt, ts[1][0], nextTAt); 409 wt.addOtherT(testTAt, ts[1][0], nextTAt);
410 wt.addOtherT(nextTAt, ts[0][0], testTAt); 410 wt.addOtherT(nextTAt, ts[0][0], testTAt);
411 } while (wt.advance()); 411 } while (wt.advance());
412 } 412 }
413 413
414 // resolve any coincident pairs found while intersecting, and 414 // resolve any coincident pairs found while intersecting, and
415 // see if coincidence is formed by clipping non-concident segments 415 // see if coincidence is formed by clipping non-concident segments
416 void CoincidenceCheck(SkTDArray<SkOpContour*>* contourList, int total) { 416 void CoincidenceCheck(SkTArray<SkOpContour*, true>* contourList, int total) {
417 int contourCount = (*contourList).count(); 417 int contourCount = (*contourList).count();
418 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { 418 for (int cIndex = 0; cIndex < contourCount; ++cIndex) {
419 SkOpContour* contour = (*contourList)[cIndex]; 419 SkOpContour* contour = (*contourList)[cIndex];
420 contour->addCoincidentPoints(); 420 contour->addCoincidentPoints();
421 } 421 }
422 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { 422 for (int cIndex = 0; cIndex < contourCount; ++cIndex) {
423 SkOpContour* contour = (*contourList)[cIndex]; 423 SkOpContour* contour = (*contourList)[cIndex];
424 contour->calcCoincidentWinding(); 424 contour->calcCoincidentWinding();
425 } 425 }
426 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { 426 for (int cIndex = 0; cIndex < contourCount; ++cIndex) {
427 SkOpContour* contour = (*contourList)[cIndex]; 427 SkOpContour* contour = (*contourList)[cIndex];
428 contour->findTooCloseToCall(); 428 contour->findTooCloseToCall();
429 } 429 }
430 } 430 }
OLDNEW
« no previous file with comments | « src/pathops/SkAddIntersections.h ('k') | src/pathops/SkDCubicIntersection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698