simplify bitmap scaler and cache
BUG=skia:
Review URL: https://codereview.chromium.org/1320513005
diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp
index 6314863..cf8327f 100644
--- a/tests/SkResourceCacheTest.cpp
+++ b/tests/SkResourceCacheTest.cpp
@@ -21,9 +21,9 @@
SkScalar xScale,
SkScalar yScale) {
SkBitmap scaled;
- float roundedImageWidth = SkScalarRoundToScalar(orig.width() * xScale);
- float roundedImageHeight = SkScalarRoundToScalar(orig.height() * yScale);
- return SkBitmapCache::Find(orig, roundedImageWidth, roundedImageHeight, &scaled);
+ int width = SkScalarRoundToInt(orig.width() * xScale);
+ int height = SkScalarRoundToInt(orig.height() * yScale);
+ return SkBitmapCache::FindWH(orig, width, height, &scaled);
}
// Draw a scaled bitmap, then return true if it has been cached.