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

Unified Diff: src/pathops/SkDCubicIntersection.cpp

Issue 19543005: turn off debugging printfs (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pathops/SkDCubicLineIntersection.cpp » ('j') | src/pathops/SkOpSegment.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pathops/SkDCubicIntersection.cpp
diff --git a/src/pathops/SkDCubicIntersection.cpp b/src/pathops/SkDCubicIntersection.cpp
index 6e049708ac1a046e32bc2a02864447b57e0d11af..fa638d088da387bd5a54550ca87cdc299d066c95 100644
--- a/src/pathops/SkDCubicIntersection.cpp
+++ b/src/pathops/SkDCubicIntersection.cpp
@@ -121,8 +121,8 @@ static void intersect(const SkDCubic& cubic1, double t1s, double t1e, const SkDC
double to1 = t1Start + (t1 - t1Start) * locals[0][tIdx];
double to2 = t2Start + (t2 - t2Start) * locals[1][tIdx];
// if the computed t is not sufficiently precise, iterate
- SkDPoint p1 = cubic1.xyAtT(to1);
- SkDPoint p2 = cubic2.xyAtT(to2);
+ SkDPoint p1 = cubic1.ptAtT(to1);
+ SkDPoint p2 = cubic2.ptAtT(to2);
if (p1.approximatelyEqual(p2)) {
if (locals.isCoincident(tIdx)) {
if (coStart[0] < 0) {
@@ -389,7 +389,7 @@ static bool closeStart(const SkDCubic& cubic, int cubicIndex, SkIntersections& i
if (i[cubicIndex][0] != 0 || i[cubicIndex][1] > CLOSE_ENOUGH) {
return false;
}
- pt = cubic.xyAtT((i[cubicIndex][0] + i[cubicIndex][1]) / 2);
+ pt = cubic.ptAtT((i[cubicIndex][0] + i[cubicIndex][1]) / 2);
return true;
}
@@ -398,7 +398,7 @@ static bool closeEnd(const SkDCubic& cubic, int cubicIndex, SkIntersections& i,
if (i[cubicIndex][last] != 1 || i[cubicIndex][last - 1] < 1 - CLOSE_ENOUGH) {
return false;
}
- pt = cubic.xyAtT((i[cubicIndex][last] + i[cubicIndex][last - 1]) / 2);
+ pt = cubic.ptAtT((i[cubicIndex][last] + i[cubicIndex][last - 1]) / 2);
return true;
}
@@ -440,8 +440,8 @@ int SkIntersections::intersect(const SkDCubic& c1, const SkDCubic& c2) {
for (int index = 0; index < last; ++index) {
double mid1 = (fT[0][index] + fT[0][index + 1]) / 2;
double mid2 = (fT[1][index] + fT[1][index + 1]) / 2;
- pt[0] = c1.xyAtT(mid1);
- pt[1] = c2.xyAtT(mid2);
+ pt[0] = c1.ptAtT(mid1);
+ pt[1] = c2.ptAtT(mid2);
if (pt[0].approximatelyEqual(pt[1])) {
match |= 1 << index;
}
« no previous file with comments | « no previous file | src/pathops/SkDCubicLineIntersection.cpp » ('j') | src/pathops/SkOpSegment.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698