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

Unified Diff: chrome/browser/profiles/profile_info_util.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
Index: chrome/browser/profiles/profile_info_util.cc
diff --git a/chrome/browser/profiles/profile_info_util.cc b/chrome/browser/profiles/profile_info_util.cc
index 680334c9118fe504a238af2fc4660ef7b629b442..7601f464ae245cae623a8a61bdc02a4850c02c03 100644
--- a/chrome/browser/profiles/profile_info_util.cc
+++ b/chrome/browser/profiles/profile_info_util.cc
@@ -23,7 +23,7 @@ gfx::Image GetSizedAvatarIconWithBorder(const gfx::Image& image,
int length = std::min(width, height) - kAvatarIconBorder;
SkBitmap bmp = skia::ImageOperations::Resize(
*image.ToSkBitmap(), skia::ImageOperations::RESIZE_BEST, length, length);
- gfx::Canvas canvas(gfx::Size(width, height), ui::SCALE_FACTOR_100P, false);
+ gfx::Canvas canvas(gfx::Size(width, height), 1.0f, false);
// Draw the icon centered on the canvas.
int x = (width - length) / 2;
@@ -52,8 +52,8 @@ gfx::Image GetAvatarIconForWebUI(const gfx::Image& image,
std::min(kAvatarIconWidth, kAvatarIconHeight) - kAvatarIconBorder;
SkBitmap bmp = skia::ImageOperations::Resize(
*image.ToSkBitmap(), skia::ImageOperations::RESIZE_BEST, length, length);
- gfx::Canvas canvas(gfx::Size(kAvatarIconWidth, kAvatarIconHeight),
- ui::SCALE_FACTOR_100P, false);
+ gfx::Canvas canvas(
+ gfx::Size(kAvatarIconWidth, kAvatarIconHeight), 1.0f, false);
// Draw the icon centered on the canvas.
int x = (kAvatarIconWidth - length) / 2;
@@ -74,8 +74,7 @@ gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image,
std::min(dst_width, dst_height)) - kAvatarIconBorder;
SkBitmap bmp = skia::ImageOperations::Resize(
*image.ToSkBitmap(), skia::ImageOperations::RESIZE_BEST, length, length);
- gfx::Canvas canvas(gfx::Size(dst_width, dst_height), ui::SCALE_FACTOR_100P,
- false);
+ gfx::Canvas canvas(gfx::Size(dst_width, dst_height), 1.0f, false);
// Draw the icon on the bottom center of the canvas.
int x1 = (dst_width - length) / 2;
@@ -102,4 +101,4 @@ gfx::Image GetAvatarIconForTitleBar(const gfx::Image& image,
return gfx::Image(gfx::ImageSkia(canvas.ExtractImageRep()));
}
-} // namespace
+} // namespace profiles
« no previous file with comments | « chrome/browser/history/select_favicon_frames_unittest.cc ('k') | chrome/browser/speech/speech_recognition_bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698