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

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

Issue 131103009: update pathops to circle sort (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: disable old test that still fails on linux 32 release Created 6 years, 8 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
« no previous file with comments | « include/core/SkPostConfig.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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 SkIntersections ts; 417 SkIntersections ts;
418 int pts = ts.cubic(wt.pts()); 418 int pts = ts.cubic(wt.pts());
419 debugShowCubicIntersection(pts, wt, ts); 419 debugShowCubicIntersection(pts, wt, ts);
420 if (!pts) { 420 if (!pts) {
421 continue; 421 continue;
422 } 422 }
423 SkASSERT(pts == 1); 423 SkASSERT(pts == 1);
424 SkASSERT(ts[0][0] >= 0 && ts[0][0] <= 1); 424 SkASSERT(ts[0][0] >= 0 && ts[0][0] <= 1);
425 SkASSERT(ts[1][0] >= 0 && ts[1][0] <= 1); 425 SkASSERT(ts[1][0] >= 0 && ts[1][0] <= 1);
426 SkPoint point = ts.pt(0).asSkPoint(); 426 SkPoint point = ts.pt(0).asSkPoint();
427 int testTAt = wt.addSelfT(wt, point, ts[0][0]); 427 int testTAt = wt.addSelfT(point, ts[0][0]);
428 int nextTAt = wt.addT(wt, point, ts[1][0]); 428 int nextTAt = wt.addSelfT(point, ts[1][0]);
429 wt.addOtherT(testTAt, ts[1][0], nextTAt); 429 wt.addOtherT(testTAt, ts[1][0], nextTAt);
430 wt.addOtherT(nextTAt, ts[0][0], testTAt); 430 wt.addOtherT(nextTAt, ts[0][0], testTAt);
431 } while (wt.advance()); 431 } while (wt.advance());
432 } 432 }
433 433
434 // resolve any coincident pairs found while intersecting, and 434 // resolve any coincident pairs found while intersecting, and
435 // see if coincidence is formed by clipping non-concident segments 435 // see if coincidence is formed by clipping non-concident segments
436 void CoincidenceCheck(SkTArray<SkOpContour*, true>* contourList, int total) { 436 void CoincidenceCheck(SkTArray<SkOpContour*, true>* contourList, int total) {
437 int contourCount = (*contourList).count(); 437 int contourCount = (*contourList).count();
438 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { 438 for (int cIndex = 0; cIndex < contourCount; ++cIndex) {
439 SkOpContour* contour = (*contourList)[cIndex]; 439 SkOpContour* contour = (*contourList)[cIndex];
440 contour->addCoincidentPoints(); 440 contour->addCoincidentPoints();
441 } 441 }
442 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { 442 for (int cIndex = 0; cIndex < contourCount; ++cIndex) {
443 SkOpContour* contour = (*contourList)[cIndex]; 443 SkOpContour* contour = (*contourList)[cIndex];
444 contour->calcCoincidentWinding(); 444 contour->calcCoincidentWinding();
445 } 445 }
446 for (int cIndex = 0; cIndex < contourCount; ++cIndex) { 446 for (int cIndex = 0; cIndex < contourCount; ++cIndex) {
447 SkOpContour* contour = (*contourList)[cIndex]; 447 SkOpContour* contour = (*contourList)[cIndex];
448 contour->calcPartialCoincidentWinding(); 448 contour->calcPartialCoincidentWinding();
449 } 449 }
450 } 450 }
OLDNEW
« no previous file with comments | « include/core/SkPostConfig.h ('k') | src/pathops/SkDCubicIntersection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698