| Index: src/pathops/SkIntersections.cpp
|
| diff --git a/src/pathops/SkIntersections.cpp b/src/pathops/SkIntersections.cpp
|
| index fe23316683ba71f67cdf89ec6bb0da03621bdf03..242c67b926e733c918b517cd2b609dd0c73c6a41 100644
|
| --- a/src/pathops/SkIntersections.cpp
|
| +++ b/src/pathops/SkIntersections.cpp
|
| @@ -54,108 +54,6 @@ void SkIntersections::flip() {
|
| }
|
| }
|
|
|
| -void SkIntersections::insertCoincidentPair(double s1, double e1, double s2, double e2,
|
| - const SkDPoint& startPt, const SkDPoint& endPt) {
|
| - SkASSERT(s1 < e1);
|
| - SkASSERT(s2 != e2);
|
| - if (coincidentUsed() != fUsed) { // if the curve is partially coincident, treat it as fully so
|
| - for (int index = fUsed - 1; index >= 0; --index) {
|
| - if (fIsCoincident[0] & (1 << index)) {
|
| - continue;
|
| - }
|
| - double nonCoinT = fT[0][index];
|
| - if (!between(s1, nonCoinT, e1)) {
|
| - if (s1 > nonCoinT) {
|
| - s1 = nonCoinT;
|
| - } else {
|
| - e1 = nonCoinT;
|
| - }
|
| - }
|
| - nonCoinT = fT[1][index];
|
| - if (!between(s2, nonCoinT, e2)) {
|
| - if ((s2 > nonCoinT) ^ (s2 > e2)) {
|
| - s2 = nonCoinT;
|
| - } else {
|
| - e2 = nonCoinT;
|
| - }
|
| - }
|
| - removeOne(index);
|
| - }
|
| - }
|
| - SkASSERT(coincidentUsed() == fUsed);
|
| - SkASSERT((coincidentUsed() & 1) != 1);
|
| - int i1 = 0;
|
| - int i2 = 0;
|
| - do {
|
| - while (i1 < fUsed && !(fIsCoincident[fSwap] & (1 << i1))) {
|
| - ++i1;
|
| - }
|
| - if (i1 == fUsed) {
|
| - break;
|
| - }
|
| - SkASSERT(i1 < fUsed);
|
| - int iEnd1 = i1 + 1;
|
| - while (!(fIsCoincident[fSwap] & (1 << iEnd1))) {
|
| - ++iEnd1;
|
| - }
|
| - SkASSERT(iEnd1 < fUsed);
|
| - double cs1 = fT[fSwap][i1];
|
| - double ce1 = fT[fSwap][iEnd1];
|
| - bool s1in = between(cs1, s1, ce1) || startPt.approximatelyEqual(fPt[i1])
|
| - || startPt.approximatelyEqual(fPt[iEnd1]);
|
| - bool e1in = between(cs1, e1, ce1) || endPt.approximatelyEqual(fPt[i1])
|
| - || endPt.approximatelyEqual(fPt[iEnd1]);
|
| - while (i2 < fUsed && !(fIsCoincident[fSwap ^ 1] & (1 << i2))) {
|
| - ++i2;
|
| - }
|
| - int iEnd2 = i2 + 1;
|
| - while (!(fIsCoincident[fSwap ^ 1] & (1 << iEnd2))) {
|
| - ++iEnd2;
|
| - }
|
| - SkASSERT(iEnd2 < fUsed);
|
| - double cs2 = fT[fSwap ^ 1][i2];
|
| - double ce2 = fT[fSwap ^ 1][iEnd2];
|
| - bool s2in = between(cs2, s2, ce2) || startPt.approximatelyEqual(fPt[i2])
|
| - || startPt.approximatelyEqual(fPt[iEnd2]);
|
| - bool e2in = between(cs2, e2, ce2) || endPt.approximatelyEqual(fPt[i2])
|
| - || endPt.approximatelyEqual(fPt[iEnd2]);
|
| - if ((s1in | e1in) & (s2in | e2in)) {
|
| - if (s1 < cs1) {
|
| - fT[fSwap][i1] = s1;
|
| - fPt[i1] = startPt;
|
| - } else if (e1 < cs1) {
|
| - fT[fSwap][i1] = e1;
|
| - fPt[i1] = endPt;
|
| - }
|
| - if (s1 > ce1) {
|
| - fT[fSwap][iEnd1] = s1;
|
| - fPt[iEnd1] = startPt;
|
| - } else if (e1 > ce1) {
|
| - fT[fSwap][iEnd1] = e1;
|
| - fPt[iEnd1] = endPt;
|
| - }
|
| - if (s2 > e2) {
|
| - SkTSwap(cs2, ce2);
|
| - SkTSwap(i2, iEnd2);
|
| - }
|
| - if (s2 < cs2) {
|
| - fT[fSwap ^ 1][i2] = s2;
|
| - } else if (e2 < cs2) {
|
| - fT[fSwap ^ 1][i2] = e2;
|
| - }
|
| - if (s2 > ce2) {
|
| - fT[fSwap ^ 1][iEnd2] = s2;
|
| - } else if (e2 > ce2) {
|
| - fT[fSwap ^ 1][iEnd2] = e2;
|
| - }
|
| - return;
|
| - }
|
| - } while (true);
|
| - SkASSERT(fUsed < 9);
|
| - insertCoincident(s1, s2, startPt);
|
| - insertCoincident(e1, e2, endPt);
|
| -}
|
| -
|
| int SkIntersections::insert(double one, double two, const SkDPoint& pt) {
|
| if (fIsCoincident[0] == 3 && between(fT[0][0], one, fT[0][1])) {
|
| // For now, don't allow a mix of coincident and non-coincident intersections
|
|
|