Index: ui/base/resource/resource_bundle.cc |
diff --git a/ui/base/resource/resource_bundle.cc b/ui/base/resource/resource_bundle.cc |
index 2c505595cb56365977fb2326f9eab0b20869da7c..7722ddb443e3b43a085655f16067753c47aaeb05 100644 |
--- a/ui/base/resource/resource_bundle.cc |
+++ b/ui/base/resource/resource_bundle.cc |
@@ -109,7 +109,7 @@ class ResourceBundle::ResourceBundleImageSource : public gfx::ImageSkiaSource { |
if (!found) |
return gfx::ImageSkiaRep(); |
- float loaded_image_scale = ui::GetImageScale(scale_factor); |
+ float loaded_image_scale = ui::GetImageScaleForScaleFactor(scale_factor); |
if (fell_back_to_1x) { |
// GRIT fell back to the 100% image, so rescale it to the correct size. |
@@ -353,7 +353,13 @@ gfx::Image& ResourceBundle::GetImageNamed(int resource_id) { |
DCHECK(!data_packs_.empty()) << |
"Missing call to SetResourcesDataDLL?"; |
- float scale = PlatformGetImageScale(); |
+#if defined(OS_CHROMEOS) || defined(OS_WIN) |
+ ui::ScaleFactor scale_factor_to_load = GetMaxScaleFactor(); |
+#else |
+ ui::ScaleFactor scale_factor_to_load = ui::SCALE_FACTOR_100P; |
+#endif |
+ |
+ float scale = GetImageScale(scale_factor_to_load); |
// TODO(oshima): Consider reading the image size from png IHDR chunk and |
// skip decoding here and remove #ifdef below. |
@@ -823,15 +829,6 @@ SkBitmap ResourceBundle::PlatformScaleImage(const SkBitmap& image, |
float desired_scale) { |
return image; |
} |
- |
-float ResourceBundle::PlatformGetImageScale() { |
-#if defined(OS_CHROMEOS) |
- ui::ScaleFactor scale_factor_to_load = GetMaxScaleFactor(); |
-#else |
- ui::ScaleFactor scale_factor_to_load = ui::SCALE_FACTOR_100P; |
-#endif |
- return GetImageScale(scale_factor_to_load); |
-} |
#endif |
} // namespace ui |