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

Unified Diff: tests/MatrixTest.cpp

Issue 1138263002: Revert of stop calling SkScalarDiv (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « tests/DrawBitmapRectTest.cpp ('k') | tests/PathCoverageTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/MatrixTest.cpp
diff --git a/tests/MatrixTest.cpp b/tests/MatrixTest.cpp
index 72e0dcc0214be24967c4f65ef0b78557eae0a2d5..95d33acabd7ac42e0545efbc93b2a84d32ca668b 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, d / maxScale < gVectorScaleTol);
- REPORTER_ASSERT(reporter, minScale / d < gVectorScaleTol);
+ REPORTER_ASSERT(reporter, SkScalarDiv(d, maxScale) < gVectorScaleTol);
+ REPORTER_ASSERT(reporter, SkScalarDiv(minScale, d) < gVectorScaleTol);
if (max < d) {
max = d;
}
@@ -279,8 +279,8 @@
min = d;
}
}
- REPORTER_ASSERT(reporter, max / maxScale >= gCloseScaleTol);
- REPORTER_ASSERT(reporter, minScale / min >= gCloseScaleTol);
+ REPORTER_ASSERT(reporter, SkScalarDiv(max, maxScale) >= gCloseScaleTol);
+ REPORTER_ASSERT(reporter, SkScalarDiv(minScale, min) >= gCloseScaleTol);
}
}
« no previous file with comments | « tests/DrawBitmapRectTest.cpp ('k') | tests/PathCoverageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698