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

Unified Diff: tests/GeometryTest.cpp

Issue 1001833006: remove slower scalar code in favor of vectors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 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
« src/core/SkGeometry.cpp ('K') | « src/core/SkGeometry.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/GeometryTest.cpp
diff --git a/tests/GeometryTest.cpp b/tests/GeometryTest.cpp
index 4109c0a2b150e7aceba02f9b15d7ad282bb818a0..846afaed2d06582479f0638d823a8e3a27e6f72b 100644
--- a/tests/GeometryTest.cpp
+++ b/tests/GeometryTest.cpp
@@ -63,38 +63,7 @@ static void test_evalquadat(skiatest::Reporter* reporter) {
SkEvalQuadAt(pts, t, NULL, &v0);
SkVector v1 = SkEvalQuadTangentAt(pts, t);
check_pairs(reporter, i, t, "quad-tan", v0.fX, v0.fY, v1.fX, v1.fY);
-
- SkPoint dst0[5], dst1[5];
- SkChopQuadAt(pts, dst0, t);
- SkChopQuadAt2(pts, dst1, t);
- for (int k = 0; k < 5; ++k) {
- check_pairs(reporter, i, t, "chop-quad",
- dst0[k].fX, dst0[k].fY, dst1[k].fX, dst1[k].fY);
- }
-
- t += dt;
- }
- }
-}
-static void test_cubicat(skiatest::Reporter* reporter) {
- SkRandom rand;
- for (int i = 0; i < 1000; ++i) {
- SkPoint pts[4];
- for (int j = 0; j < 4; ++j) {
- pts[j].set(rand.nextSScalar1() * 100, rand.nextSScalar1() * 100);
- }
- const SkScalar dt = SK_Scalar1 / 128;
- SkScalar t = dt;
- for (int j = 1; j < 128; ++j) {
- SkPoint dst0[7], dst1[7];
- SkChopCubicAt(pts, dst0, t);
- SkChopCubicAt2(pts, dst1, t);
- for (int k = 0; k < 7; ++k) {
- check_pairs(reporter, i, t, "chop-cubic",
- dst0[k].fX, dst0[k].fY, dst1[k].fX, dst1[k].fY);
- }
-
t += dt;
}
}
@@ -179,5 +148,4 @@ DEF_TEST(Geometry, reporter) {
testChopCubic(reporter);
test_evalquadat(reporter);
test_conic(reporter);
- test_cubicat(reporter);
}
« src/core/SkGeometry.cpp ('K') | « src/core/SkGeometry.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698