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

Unified Diff: components/favicon_base/select_favicon_frames.cc

Issue 294863002: Cleanup changes related to replacing usage of GetImageScale with GetScaleForScaleFactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removing changes to enable high dpi by default from this patch 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
Index: components/favicon_base/select_favicon_frames.cc
diff --git a/components/favicon_base/select_favicon_frames.cc b/components/favicon_base/select_favicon_frames.cc
index 32f7094c91d2a5f82db6084fa12ea9287c8f8315..888837fe82d40d2ef36e71fa10b959ec57027151 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;
}
« no previous file with comments | « chrome/browser/history/select_favicon_frames_unittest.cc ('k') | content/browser/renderer_host/render_process_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698