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

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

Issue 283383005: Initial sets of fixes for themes to work well with HiDPI Windows. More changes coming in a separate… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed indents Created 6 years, 7 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.cc ('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 fc0c1b1c08e341021cfe7b180a9e0ad9631029a0..fa17eee50316d09eb2242857b7ef49377d00f13f 100644
--- a/ui/base/resource/resource_bundle_win.cc
+++ b/ui/base/resource/resource_bundle_win.cc
@@ -65,34 +65,6 @@ gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
return GetImageNamed(resource_id);
}
-// static
-SkBitmap ResourceBundle::PlatformScaleImage(const SkBitmap& image,
- float loaded_image_scale,
- float desired_bitmap_scale) {
- if (!gfx::IsHighDPIEnabled())
- return SkBitmap();
-
- // On Windows we can have multiple device scales like 1/1.25/1.5/2, etc.
- // We only have 1x and 2x data packs. We need to scale the bitmaps
- // accordingly.
- if (loaded_image_scale == desired_bitmap_scale)
- return image;
-
- SkBitmap scaled_image;
- gfx::Size unscaled_size(image.width(), image.height());
- gfx::Size scaled_size = ToCeiledSize(
- gfx::ScaleSize(unscaled_size,
- desired_bitmap_scale / loaded_image_scale));
- scaled_image = skia::ImageOperations::Resize(
- image,
- skia::ImageOperations::RESIZE_LANCZOS3,
- scaled_size.width(),
- scaled_size.height());
- DCHECK_EQ(scaled_image.width(), scaled_size.width());
- DCHECK_EQ(scaled_image.height(), scaled_size.height());
- return scaled_image;
-}
-
void SetResourcesDataDLL(HINSTANCE handle) {
resources_data_dll = handle;
}
« ui/base/resource/resource_bundle.cc ('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