Index: tests/DrawBitmapRectTest.cpp |
diff --git a/tests/DrawBitmapRectTest.cpp b/tests/DrawBitmapRectTest.cpp |
index 80167b7083218a3a2d1bb1827b333c9728024a91..9c522db28e80f22cd708c4b65d4cccdda18b497b 100644 |
--- a/tests/DrawBitmapRectTest.cpp |
+++ b/tests/DrawBitmapRectTest.cpp |
@@ -124,19 +124,19 @@ |
REPORTER_ASSERT(reporter, treat_as_sprite(mat, size, bilerBits)); |
const SkScalar twoThirds = SK_Scalar1 * 2 / 3; |
- const SkScalar bigScale = (size.width() + twoThirds) / size.width(); |
+ const SkScalar bigScale = SkScalarDiv(size.width() + twoThirds, size.width()); |
mat.setScale(bigScale, bigScale); |
REPORTER_ASSERT(reporter, !treat_as_sprite(mat, size, false)); |
REPORTER_ASSERT(reporter, !treat_as_sprite(mat, size, bilerBits)); |
const SkScalar oneThird = SK_Scalar1 / 3; |
- const SkScalar smallScale = (size.width() + oneThird) / size.width(); |
+ const SkScalar smallScale = SkScalarDiv(size.width() + oneThird, size.width()); |
mat.setScale(smallScale, smallScale); |
REPORTER_ASSERT(reporter, treat_as_sprite(mat, size, false)); |
REPORTER_ASSERT(reporter, !treat_as_sprite(mat, size, bilerBits)); |
const SkScalar oneFortyth = SK_Scalar1 / 40; |
- const SkScalar tinyScale = (size.width() + oneFortyth) / size.width(); |
+ const SkScalar tinyScale = SkScalarDiv(size.width() + oneFortyth, size.width()); |
mat.setScale(tinyScale, tinyScale); |
REPORTER_ASSERT(reporter, treat_as_sprite(mat, size, false)); |
REPORTER_ASSERT(reporter, treat_as_sprite(mat, size, bilerBits)); |