| 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 "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 Loading... |
| 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 } |
| OLD | NEW |