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

Unified Diff: chrome/common/badge_util.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/webui/ntp/ntp_login_handler.cc ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/badge_util.cc
diff --git a/chrome/common/badge_util.cc b/chrome/common/badge_util.cc
index 3859a7235aa57c3a20c53079ac85c3d2008a2b66..42668e86b3bfdfd56778cf556a1acefdddaf1a8c 100644
--- a/chrome/common/badge_util.cc
+++ b/chrome/common/badge_util.cc
@@ -84,8 +84,8 @@ SkBitmap DrawBadgeIconOverlay(const SkBitmap& icon,
badge_width--;
// Render the badge bitmap and overlay into a canvas.
- scoped_ptr<gfx::Canvas> canvas(
- new gfx::Canvas(gfx::Size(badge_width, icon.height()), false));
+ scoped_ptr<gfx::Canvas> canvas(new gfx::Canvas(
+ gfx::Size(badge_width, icon.height()), ui::SCALE_FACTOR_100P, false));
canvas->DrawImageInt(icon, 0, 0);
// Draw the text overlay centered horizontally and vertically. Skia expects
@@ -97,7 +97,7 @@ SkBitmap DrawBadgeIconOverlay(const SkBitmap& icon,
badge_text.c_str(), badge_text.size(), x, y, *paint);
// Return the generated image.
- return canvas->ExtractBitmap();
+ return canvas->ExtractImageRep().sk_bitmap();
}
} // namespace badge_util
« no previous file with comments | « chrome/browser/ui/webui/ntp/ntp_login_handler.cc ('k') | chrome/renderer/print_web_view_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698