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

Unified Diff: trunk/src/chrome/browser/profiles/profile_info_util.cc

Issue 24262008: Revert 224473 "Remove dependency on ui::ScaleFactor from ui/gfx" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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: trunk/src/chrome/browser/profiles/profile_info_util.cc
===================================================================
--- trunk/src/chrome/browser/profiles/profile_info_util.cc (revision 224497)
+++ trunk/src/chrome/browser/profiles/profile_info_util.cc (working copy)
@@ -23,7 +23,7 @@
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), 1.0f, false);
+ gfx::Canvas canvas(gfx::Size(width, height), ui::SCALE_FACTOR_100P, false);
// Draw the icon centered on the canvas.
int x = (width - length) / 2;
@@ -52,8 +52,8 @@
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), 1.0f, false);
+ gfx::Canvas canvas(gfx::Size(kAvatarIconWidth, kAvatarIconHeight),
+ ui::SCALE_FACTOR_100P, false);
// Draw the icon centered on the canvas.
int x = (kAvatarIconWidth - length) / 2;
@@ -74,7 +74,8 @@
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), 1.0f, false);
+ gfx::Canvas canvas(gfx::Size(dst_width, dst_height), ui::SCALE_FACTOR_100P,
+ false);
// Draw the icon on the bottom center of the canvas.
int x1 = (dst_width - length) / 2;
@@ -101,4 +102,4 @@
return gfx::Image(gfx::ImageSkia(canvas.ExtractImageRep()));
}
-} // namespace profiles
+} // namespace

Powered by Google App Engine
This is Rietveld 408576698