aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-02-14 10:59:19 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-02-14 19:45:24 +0000
commitdf85c38163245c7fc3c23cad3a4ad104949f3a62 (patch)
tree9f56ae6ce07ee9ae6a87e2bd2c52ee787fee7b32 /tests
parent78c0c4c5a0bed8ac54542d2d378a0fc9ec8c034b (diff)
stop using SkScalarMul
BUG=skia: Change-Id: Ie41d8665a1c62ba8eddc93d8cfefaf64ddc52ff8 Reviewed-on: https://skia-review.googlesource.com/8411 Reviewed-by: Ben Wagner <bungeman@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ClipStackTest.cpp4
-rw-r--r--tests/PaintTest.cpp2
-rw-r--r--tests/PathTest.cpp2
-rw-r--r--tests/RoundRectTest.cpp12
4 files changed, 10 insertions, 10 deletions
diff --git a/tests/ClipStackTest.cpp b/tests/ClipStackTest.cpp
index 8448f4cbe5..744ef18d17 100644
--- a/tests/ClipStackTest.cpp
+++ b/tests/ClipStackTest.cpp
@@ -979,8 +979,8 @@ static void test_reduced_clip_stack(skiatest::Reporter* reporter) {
bool doSave = r.nextBool();
SkSize size = SkSize::Make(
- SkScalarMul(kBounds.width(), r.nextRangeScalar(kMinElemSizeFrac, kMaxElemSizeFrac)),
- SkScalarMul(kBounds.height(), r.nextRangeScalar(kMinElemSizeFrac, kMaxElemSizeFrac)));
+ kBounds.width() * r.nextRangeScalar(kMinElemSizeFrac, kMaxElemSizeFrac),
+ kBounds.height() * r.nextRangeScalar(kMinElemSizeFrac, kMaxElemSizeFrac));
SkPoint xy = {r.nextRangeScalar(kBounds.fLeft, kBounds.fRight - size.fWidth),
r.nextRangeScalar(kBounds.fTop, kBounds.fBottom - size.fHeight)};
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index 55a82a73e4..7ddcd0d78f 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -192,7 +192,7 @@ DEF_TEST(Paint_regression_cubic, reporter) {
SkRect maxR = fillR;
SkScalar miter = SkMaxScalar(SK_Scalar1, paint.getStrokeMiter());
SkScalar inset = paint.getStrokeJoin() == SkPaint::kMiter_Join ?
- SkScalarMul(paint.getStrokeWidth(), miter) :
+ paint.getStrokeWidth() * miter :
paint.getStrokeWidth();
maxR.inset(-inset, -inset);
diff --git a/tests/PathTest.cpp b/tests/PathTest.cpp
index 694dab57ee..d45f02eaf5 100644
--- a/tests/PathTest.cpp
+++ b/tests/PathTest.cpp
@@ -1739,7 +1739,7 @@ static void test_conservativelyContains(skiatest::Reporter* reporter) {
// A circle that bounds kBaseRect (with a significant amount of slop)
SkScalar circleR = SkMaxScalar(kBaseRect.width(), kBaseRect.height());
- circleR = SkScalarMul(circleR, 1.75f) / 2;
+ circleR *= 1.75f / 2;
static const SkPoint kCircleC = {kBaseRect.centerX(), kBaseRect.centerY()};
// round-rect radii
diff --git a/tests/RoundRectTest.cpp b/tests/RoundRectTest.cpp
index 37f5318d30..ce9744571b 100644
--- a/tests/RoundRectTest.cpp
+++ b/tests/RoundRectTest.cpp
@@ -660,18 +660,18 @@ static void test_transform_helper(skiatest::Reporter* reporter, const SkRRect& o
// Radii are scaled.
for (int i = 0; i < 4; ++i) {
REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.radii((SkRRect::Corner) i).fX,
- SkScalarMul(orig.radii((SkRRect::Corner) i).fX, xScale)));
+ orig.radii((SkRRect::Corner) i).fX * xScale));
REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.radii((SkRRect::Corner) i).fY,
- SkScalarMul(orig.radii((SkRRect::Corner) i).fY, yScale)));
+ orig.radii((SkRRect::Corner) i).fY * yScale));
}
REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.rect().width(),
- SkScalarMul(orig.rect().width(), xScale)));
+ orig.rect().width() * xScale));
REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.rect().height(),
- SkScalarMul(orig.rect().height(), yScale)));
+ orig.rect().height() * yScale));
REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.rect().left(),
- SkScalarMul(orig.rect().left(), xScale)));
+ orig.rect().left() * xScale));
REPORTER_ASSERT(reporter, SkScalarNearlyEqual(dst.rect().top(),
- SkScalarMul(orig.rect().top(), yScale)));
+ orig.rect().top() * yScale));
}
static void test_round_rect_transform(skiatest::Reporter* reporter) {