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

Unified Diff: chrome/common/badge_util.cc

Issue 10790128: Revert 147915 - 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
===================================================================
--- chrome/common/badge_util.cc (revision 147935)
+++ chrome/common/badge_util.cc (working copy)
@@ -84,8 +84,8 @@
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()), ui::SCALE_FACTOR_100P, false));
+ scoped_ptr<gfx::Canvas> canvas(
+ new gfx::Canvas(gfx::Size(badge_width, icon.height()), false));
canvas->DrawImageInt(icon, 0, 0);
// Draw the text overlay centered horizontally and vertically. Skia expects
@@ -97,7 +97,7 @@
badge_text.c_str(), badge_text.size(), x, y, *paint);
// Return the generated image.
- return canvas->ExtractImageRep().sk_bitmap();
+ return canvas->ExtractBitmap();
}
} // 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