aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkResourceCacheTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/SkResourceCacheTest.cpp')
-rw-r--r--tests/SkResourceCacheTest.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/SkResourceCacheTest.cpp b/tests/SkResourceCacheTest.cpp
index 6314863e50..cf8327fcde 100644
--- a/tests/SkResourceCacheTest.cpp
+++ b/tests/SkResourceCacheTest.cpp
@@ -21,9 +21,9 @@ static bool is_in_scaled_image_cache(const SkBitmap& orig,
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.