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

Unified Diff: tests/PathOpsQuadIntersectionTest.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
Index: tests/PathOpsQuadIntersectionTest.cpp
diff --git a/tests/PathOpsQuadIntersectionTest.cpp b/tests/PathOpsQuadIntersectionTest.cpp
index ee2e8de8a191dfab5698fde2388978a0d43e287f..bb97d51252892167425fa22129b200fea615df9b 100644
--- a/tests/PathOpsQuadIntersectionTest.cpp
+++ b/tests/PathOpsQuadIntersectionTest.cpp
@@ -37,9 +37,9 @@ static void standardTestCases(skiatest::Reporter* reporter) {
if (intersections.used() > 0) {
for (int pt = 0; pt < intersections.used(); ++pt) {
double tt1 = intersections[0][pt];
- SkDPoint xy1 = quad1.xyAtT(tt1);
+ SkDPoint xy1 = quad1.ptAtT(tt1);
double tt2 = intersections[1][pt];
- SkDPoint xy2 = quad2.xyAtT(tt2);
+ SkDPoint xy2 = quad2.ptAtT(tt2);
if (!xy1.approximatelyEqual(xy2)) {
SkDebugf("%s [%d,%d] x!= t1=%g (%g,%g) t2=%g (%g,%g)\n",
__FUNCTION__, static_cast<int>(index), pt, tt1, xy1.fX, xy1.fY,
@@ -256,9 +256,9 @@ static void oneOffTest1(skiatest::Reporter* reporter, size_t outer, size_t inner
intersections2.intersect(quad1, quad2);
for (int pt = 0; pt < intersections2.used(); ++pt) {
double tt1 = intersections2[0][pt];
- SkDPoint xy1 = quad1.xyAtT(tt1);
+ SkDPoint xy1 = quad1.ptAtT(tt1);
double tt2 = intersections2[1][pt];
- SkDPoint xy2 = quad2.xyAtT(tt2);
+ SkDPoint xy2 = quad2.ptAtT(tt2);
if (!xy1.approximatelyEqual(xy2)) {
SkDebugf("%s [%d,%d] x!= t1=%g (%g,%g) t2=%g (%g,%g)\n",
__FUNCTION__, static_cast<int>(outer), static_cast<int>(inner),
@@ -338,7 +338,7 @@ static const SkDQuad pointFinderTestSet[] = {
static void pointFinder(const SkDQuad& q1, const SkDQuad& q2) {
for (int index = 0; index < 3; ++index) {
double t = q1.nearestT(q2[index]);
- SkDPoint onQuad = q1.xyAtT(t);
+ SkDPoint onQuad = q1.ptAtT(t);
SkDebugf("%s t=%1.9g (%1.9g,%1.9g) dist=%1.9g\n", __FUNCTION__, t, onQuad.fX, onQuad.fY,
onQuad.distance(q2[index]));
double left[3];
@@ -388,12 +388,12 @@ static void intersectionFinder(int test1, int test2) {
SkDPoint t1[3], t2[3];
bool toggle = true;
do {
- t1[0] = quad1.xyAtT(t1Seed - t1Step);
- t1[1] = quad1.xyAtT(t1Seed);
- t1[2] = quad1.xyAtT(t1Seed + t1Step);
- t2[0] = quad2.xyAtT(t2Seed - t2Step);
- t2[1] = quad2.xyAtT(t2Seed);
- t2[2] = quad2.xyAtT(t2Seed + t2Step);
+ t1[0] = quad1.ptAtT(t1Seed - t1Step);
+ t1[1] = quad1.ptAtT(t1Seed);
+ t1[2] = quad1.ptAtT(t1Seed + t1Step);
+ t2[0] = quad2.ptAtT(t2Seed - t2Step);
+ t2[1] = quad2.ptAtT(t2Seed);
+ t2[2] = quad2.ptAtT(t2Seed + t2Step);
double dist[3][3];
dist[1][1] = t1[1].distance(t2[1]);
int best_i = 1, best_j = 1;
@@ -434,38 +434,38 @@ static void intersectionFinder(int test1, int test2) {
double t22 = t2Seed + t2Step * 2;
SkDPoint test;
while (!approximately_zero(t1Step)) {
- test = quad1.xyAtT(t10);
+ test = quad1.ptAtT(t10);
t10 += t1[1].approximatelyEqual(test) ? -t1Step : t1Step;
t1Step /= 2;
}
t1Step = 0.1;
while (!approximately_zero(t1Step)) {
- test = quad1.xyAtT(t12);
+ test = quad1.ptAtT(t12);
t12 -= t1[1].approximatelyEqual(test) ? -t1Step : t1Step;
t1Step /= 2;
}
while (!approximately_zero(t2Step)) {
- test = quad2.xyAtT(t20);
+ test = quad2.ptAtT(t20);
t20 += t2[1].approximatelyEqual(test) ? -t2Step : t2Step;
t2Step /= 2;
}
t2Step = 0.1;
while (!approximately_zero(t2Step)) {
- test = quad2.xyAtT(t22);
+ test = quad2.ptAtT(t22);
t22 -= t2[1].approximatelyEqual(test) ? -t2Step : t2Step;
t2Step /= 2;
}
#if ONE_OFF_DEBUG
SkDebugf("%s t1=(%1.9g<%1.9g<%1.9g) t2=(%1.9g<%1.9g<%1.9g)\n", __FUNCTION__,
t10, t1Seed, t12, t20, t2Seed, t22);
- SkDPoint p10 = quad1.xyAtT(t10);
- SkDPoint p1Seed = quad1.xyAtT(t1Seed);
- SkDPoint p12 = quad1.xyAtT(t12);
+ SkDPoint p10 = quad1.ptAtT(t10);
+ SkDPoint p1Seed = quad1.ptAtT(t1Seed);
+ SkDPoint p12 = quad1.ptAtT(t12);
SkDebugf("%s p1=(%1.9g,%1.9g)<(%1.9g,%1.9g)<(%1.9g,%1.9g)\n", __FUNCTION__,
p10.fX, p10.fY, p1Seed.fX, p1Seed.fY, p12.fX, p12.fY);
- SkDPoint p20 = quad2.xyAtT(t20);
- SkDPoint p2Seed = quad2.xyAtT(t2Seed);
- SkDPoint p22 = quad2.xyAtT(t22);
+ SkDPoint p20 = quad2.ptAtT(t20);
+ SkDPoint p2Seed = quad2.ptAtT(t2Seed);
+ SkDPoint p22 = quad2.ptAtT(t22);
SkDebugf("%s p2=(%1.9g,%1.9g)<(%1.9g,%1.9g)<(%1.9g,%1.9g)\n", __FUNCTION__,
p20.fX, p20.fY, p2Seed.fX, p2Seed.fY, p22.fX, p22.fY);
#endif

Powered by Google App Engine
This is Rietveld 408576698