From d823e370f31b6dfb96cc90bf07ec4480c40f7135 Mon Sep 17 00:00:00 2001 From: "ananta@chromium.org" Date: Sat, 24 May 2014 12:44:42 +0000 Subject: This is in preparation for enabling HiDPI on Windows by default. Most of the changes here are replacing usage of the ui::GetImageScale function with ui::GetScaleForScaleFactor. The patch to remove the HiDPI switch and enable it by default will follow. This patch has been incorporated from girard's patch ( https://codereview.chromium.org/232483005/) BUG=149881, 362245 Review URL: https://codereview.chromium.org/294863002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272721 0039d316-1c4b-4281-b951-d872f2087c98 --- components/favicon_base/select_favicon_frames.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'components/favicon_base') diff --git a/components/favicon_base/select_favicon_frames.cc b/components/favicon_base/select_favicon_frames.cc index 32f7094..888837f 100644 --- a/components/favicon_base/select_favicon_frames.cc +++ b/components/favicon_base/select_favicon_frames.cc @@ -54,7 +54,7 @@ size_t GetCandidateIndexWithBestScore( ResizeMethod* resize_method) { DCHECK_NE(desired_size_in_dip, 0); - float scale = ui::GetImageScale(scale_factor); + float scale = ui::GetScaleForScaleFactor(scale_factor); int desired_size_in_pixel = static_cast(desired_size_in_dip * scale + 0.5f); @@ -182,7 +182,7 @@ SkBitmap GetResizedBitmap(const SkBitmap& source_bitmap, int desired_size_in_dip, ui::ScaleFactor scale_factor, ResizeMethod resize_method) { - float scale = ui::GetImageScale(scale_factor); + float scale = ui::GetScaleForScaleFactor(scale_factor); int desired_size_in_pixel = static_cast(desired_size_in_dip * scale + 0.5f); @@ -223,7 +223,7 @@ gfx::ImageSkia SelectFaviconFrames( result.scale_factor, result.resize_method); multi_image.AddRepresentation(gfx::ImageSkiaRep( - resized_bitmap, ui::GetImageScale(result.scale_factor))); + resized_bitmap, ui::GetScaleForScaleFactor(result.scale_factor))); } return multi_image; } -- cgit v1.1