Revert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of https://codereview.chromium.org/1138263002/)
Reason for revert:
android patched, blink has rolled
Original issue's description:
> Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)
>
> Reason for revert:
> need to wait for Blink roll (and patch android)
>
> Original issue's description:
> > stop calling SkScalarDiv
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2629697933b5cc975e45d2a45c48f803fc6cbcec
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1135693003
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 95d33ac..72e0dcc 100644
--- a/tests/MatrixTest.cpp
+++ b/tests/MatrixTest.cpp
@@ -270,8 +270,8 @@
mat.mapVectors(vectors, SK_ARRAY_COUNT(vectors));
for (size_t i = 0; i < SK_ARRAY_COUNT(vectors); ++i) {
SkScalar d = vectors[i].length();
- REPORTER_ASSERT(reporter, SkScalarDiv(d, maxScale) < gVectorScaleTol);
- REPORTER_ASSERT(reporter, SkScalarDiv(minScale, d) < gVectorScaleTol);
+ REPORTER_ASSERT(reporter, d / maxScale < gVectorScaleTol);
+ REPORTER_ASSERT(reporter, minScale / d < gVectorScaleTol);
if (max < d) {
max = d;
}
@@ -279,8 +279,8 @@
min = d;
}
}
- REPORTER_ASSERT(reporter, SkScalarDiv(max, maxScale) >= gCloseScaleTol);
- REPORTER_ASSERT(reporter, SkScalarDiv(minScale, min) >= gCloseScaleTol);
+ REPORTER_ASSERT(reporter, max / maxScale >= gCloseScaleTol);
+ REPORTER_ASSERT(reporter, minScale / min >= gCloseScaleTol);
}
}