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

Unified Diff: chrome/browser/history/select_favicon_frames.cc

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler Created 7 years, 3 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
« no previous file with comments | « chrome/browser/favicon/favicon_util.cc ('k') | chrome/browser/history/select_favicon_frames_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/history/select_favicon_frames.cc
diff --git a/chrome/browser/history/select_favicon_frames.cc b/chrome/browser/history/select_favicon_frames.cc
index 09bf8ffe328869e1268e95f6e651adee6d54ee05..43a1fa496093ce85e41737403893c7a390dab0d1 100644
--- a/chrome/browser/history/select_favicon_frames.cc
+++ b/chrome/browser/history/select_favicon_frames.cc
@@ -58,7 +58,7 @@ size_t GetCandidateIndexWithBestScore(
ResizeMethod* resize_method) {
DCHECK_NE(desired_size_in_dip, 0);
- float scale = ui::GetScaleFactorScale(scale_factor);
+ float scale = ui::GetImageScale(scale_factor);
int desired_size_in_pixel =
static_cast<int>(desired_size_in_dip * scale + 0.5f);
@@ -179,7 +179,7 @@ SkBitmap GetResizedBitmap(const SkBitmap& source_bitmap,
int desired_size_in_dip,
ui::ScaleFactor scale_factor,
ResizeMethod resize_method) {
- float scale = ui::GetScaleFactorScale(scale_factor);
+ float scale = ui::GetImageScale(scale_factor);
int desired_size_in_pixel = static_cast<int>(
desired_size_in_dip * scale + 0.5f);
@@ -216,7 +216,8 @@ gfx::ImageSkia SelectFaviconFrames(
SkBitmap resized_bitmap = GetResizedBitmap(bitmaps[result.index],
desired_size, result.scale_factor, result.resize_method);
multi_image.AddRepresentation(
- gfx::ImageSkiaRep(resized_bitmap, result.scale_factor));
+ gfx::ImageSkiaRep(resized_bitmap,
+ ui::GetImageScale(result.scale_factor)));
}
return multi_image;
}
« no previous file with comments | « chrome/browser/favicon/favicon_util.cc ('k') | chrome/browser/history/select_favicon_frames_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698