aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar reed <reed@chromium.org>2015-01-20 19:58:36 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-01-20 19:58:36 -0800
commit3f43f8ab9cd3ba0ea83f5ae0659c21f101dfca7a (patch)
tree1bb626ef3a953848e28bbba764880b01fb46b124 /tests
parent3e3b58d57a358e2d52bc23ad2409a95d59310100 (diff)
remove dead SkPersp macros
BUG=skia: TBR= Review URL: https://codereview.chromium.org/864713002
Diffstat (limited to 'tests')
-rw-r--r--tests/MatrixTest.cpp10
-rw-r--r--tests/PathTest.cpp2
-rw-r--r--tests/RoundRectTest.cpp6
3 files changed, 9 insertions, 9 deletions
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 8a27a9eddf..7875d9ea45 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -202,7 +202,7 @@ static void test_matrix_min_max_scale(skiatest::Reporter* reporter) {
SkMatrix perspX;
perspX.reset();
- perspX.setPerspX(SkScalarToPersp(SK_Scalar1 / 1000));
+ perspX.setPerspX(SK_Scalar1 / 1000);
REPORTER_ASSERT(reporter, -SK_Scalar1 == perspX.getMinScale());
REPORTER_ASSERT(reporter, -SK_Scalar1 == perspX.getMaxScale());
// Verify that getMinMaxScales() doesn't update the scales array on failure.
@@ -213,7 +213,7 @@ static void test_matrix_min_max_scale(skiatest::Reporter* reporter) {
SkMatrix perspY;
perspY.reset();
- perspY.setPerspY(SkScalarToPersp(-SK_Scalar1 / 500));
+ perspY.setPerspY(-SK_Scalar1 / 500);
REPORTER_ASSERT(reporter, -SK_Scalar1 == perspY.getMinScale());
REPORTER_ASSERT(reporter, -SK_Scalar1 == perspY.getMaxScale());
scales[0] = -5;
@@ -358,13 +358,13 @@ static void test_matrix_preserve_shape(skiatest::Reporter* reporter) {
// perspective x
mat.reset();
- mat.setPerspX(SkScalarToPersp(SK_Scalar1 / 2));
+ mat.setPerspX(SK_Scalar1 / 2);
REPORTER_ASSERT(reporter, !mat.isSimilarity());
REPORTER_ASSERT(reporter, !mat.preservesRightAngles());
// perspective y
mat.reset();
- mat.setPerspY(SkScalarToPersp(SK_Scalar1 / 2));
+ mat.setPerspY(SK_Scalar1 / 2);
REPORTER_ASSERT(reporter, !mat.isSimilarity());
REPORTER_ASSERT(reporter, !mat.preservesRightAngles());
@@ -867,7 +867,7 @@ DEF_TEST(Matrix, reporter) {
REPORTER_ASSERT(reporter, affineEqual(TransY));
#undef affineEqual
- mat.set(SkMatrix::kMPersp1, SkScalarToPersp(SK_Scalar1 / 2));
+ mat.set(SkMatrix::kMPersp1, SK_Scalar1 / 2);
REPORTER_ASSERT(reporter, !mat.asAffine(affine));
SkMatrix mat2;
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index a274694b71..16131dee80 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -2207,7 +2207,7 @@ static void test_transform(skiatest::Reporter* reporter) {
{
SkMatrix matrix;
matrix.reset();
- matrix.setPerspX(SkScalarToPersp(4));
+ matrix.setPerspX(4);
SkPath p1;
p1.moveTo(SkPoint::Make(0, 0));
diff --git a/tests/RoundRectTest.cpp b/tests/RoundRectTest.cpp
index 261ec67ca0..b67718a6b1 100644
--- a/tests/RoundRectTest.cpp
+++ b/tests/RoundRectTest.cpp
@@ -433,11 +433,11 @@ static void test_transform_helper(skiatest::Reporter* reporter, const SkRRect& o
assert_transform_failure(reporter, orig, matrix);
matrix.reset();
- matrix.setPerspX(SkScalarToPersp(SkIntToScalar(4)));
+ matrix.setPerspX(4);
assert_transform_failure(reporter, orig, matrix);
matrix.reset();
- matrix.setPerspY(SkScalarToPersp(SkIntToScalar(5)));
+ matrix.setPerspY(5);
assert_transform_failure(reporter, orig, matrix);
// Rotation fails.
@@ -492,7 +492,7 @@ static void test_transform_helper(skiatest::Reporter* reporter, const SkRRect& o
REPORTER_ASSERT(reporter, orig.rect().top() == dst.rect().top());
// Keeping the scale, but adding a persp will make transform fail.
- matrix.setPerspX(SkScalarToPersp(SkIntToScalar(7)));
+ matrix.setPerspX(7);
assert_transform_failure(reporter, orig, matrix);
// Scaling in -y will flip the round rect vertically.