aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/SkResourceCacheTest.cpp
diff options
context:
space:
mode:
authorGravatar reed <reed@google.com>2015-08-31 15:16:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-31 15:16:17 -0700
commit99138876a699a41637fe8c46ccdb0292dcabd7ce (patch)
tree111029462b64e08de0899e6ff08c92ef02dce4a3 /tests/SkResourceCacheTest.cpp
parentaba1dc8c6aa5cbc4f38ddfce757832359f200b54 (diff)
simplify bitmap scaler and cache
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.