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

Unified Diff: ui/base/resource/resource_bundle_win.cc

Issue 211493009: Ensure that extension resources are loaded with the correct scaling applied on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix try server errors Created 6 years, 9 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
« ui/base/resource/resource_bundle.h ('K') | « ui/base/resource/resource_bundle.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle_win.cc
diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc
index 5e0fd2214f4d0bbed79545e5cf3de8bebebc80e7..a1537d39ac393c2369ee1999050c7e00849af5fe 100644
--- a/ui/base/resource/resource_bundle_win.cc
+++ b/ui/base/resource/resource_bundle_win.cc
@@ -66,6 +66,13 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
}
// static
+float ResourceBundle::PlatformGetImageScale(ui::ScaleFactor scale_factor) {
+ if (!gfx::IsHighDPIEnabled())
+ return ui::GetImageScale(scale_factor);
+ return gfx::win::GetDeviceScaleFactor();
+}
+
+// static
SkBitmap ResourceBundle::PlatformScaleImage(const SkBitmap& image,
float loaded_image_scale,
float desired_bitmap_scale) {
@@ -93,12 +100,6 @@ SkBitmap ResourceBundle::PlatformScaleImage(const SkBitmap& image,
return scaled_image;
}
-float ResourceBundle::PlatformGetImageScale() {
- if (!gfx::IsHighDPIEnabled())
- return ui::GetImageScale(GetMaxScaleFactor());
- return gfx::win::GetDeviceScaleFactor();
-}
-
void SetResourcesDataDLL(HINSTANCE handle) {
resources_data_dll = handle;
}
« ui/base/resource/resource_bundle.h ('K') | « ui/base/resource/resource_bundle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698