summaryrefslogtreecommitdiffstats
path: root/components/favicon_base
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-24 12:44:42 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-05-24 12:44:42 +0000
commitd823e370f31b6dfb96cc90bf07ec4480c40f7135 (patch)
tree8c84871e48e8d2e9715e78e0a8889d228984c440 /components/favicon_base
parent5070353e5ba39fb46a55e4df08743da649619041 (diff)
downloadchromium_src-d823e370f31b6dfb96cc90bf07ec4480c40f7135.zip
chromium_src-d823e370f31b6dfb96cc90bf07ec4480c40f7135.tar.gz
chromium_src-d823e370f31b6dfb96cc90bf07ec4480c40f7135.tar.bz2
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
Diffstat (limited to 'components/favicon_base')
-rw-r--r--components/favicon_base/select_favicon_frames.cc6
1 files changed, 3 insertions, 3 deletions
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<int>(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<int>(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;
}