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

Unified Diff: chrome/browser/ui/webui/ntp/ntp_login_handler.cc

Issue 10701063: Cleanup gfx::Canvas now that 10562027 has landed (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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/ui/views/theme_helpers.cc ('k') | chrome/common/badge_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/ntp/ntp_login_handler.cc
diff --git a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
index e391b54e4fdd9850ff91057316775d494b166d51..14ea6fa97180c78f65fec70af3d83e5597cbeddf 100644
--- a/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
+++ b/chrome/browser/ui/webui/ntp/ntp_login_handler.cc
@@ -60,14 +60,15 @@ SkBitmap GetGAIAPictureForNTP(const gfx::Image& image) {
SkBitmap bmp = skia::ImageOperations::Resize(*image.ToSkBitmap(),
skia::ImageOperations::RESIZE_BEST, kLength, kLength);
- gfx::Canvas canvas(gfx::Size(kLength, kLength), false);
+ gfx::Canvas canvas(gfx::Size(kLength, kLength), ui::SCALE_FACTOR_100P,
+ false);
canvas.DrawImageInt(bmp, 0, 0);
// Draw a gray border on the inside of the icon.
SkColor color = SkColorSetARGB(83, 0, 0, 0);
canvas.DrawRect(gfx::Rect(0, 0, kLength - 1, kLength - 1), color);
- return canvas.ExtractBitmap();
+ return canvas.ExtractImageRep().sk_bitmap();
}
// Puts the |content| into a span with the given CSS class.
« no previous file with comments | « chrome/browser/ui/views/theme_helpers.cc ('k') | chrome/common/badge_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698