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

Unified Diff: chrome/common/badge_util.cc

Issue 8122013: Allow CanvasSkia to bind to an existing SkCanvas. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: 1 more fix Created 9 years, 2 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/common/badge_util.cc
diff --git a/chrome/common/badge_util.cc b/chrome/common/badge_util.cc
index 464972675bc1b580653dbc9c6eae0c67430cd6e7..3175de82ba94423be9d3d5243f18b1407ab1beae 100644
--- a/chrome/common/badge_util.cc
+++ b/chrome/common/badge_util.cc
@@ -92,7 +92,8 @@ SkBitmap DrawBadgeIconOverlay(const SkBitmap& icon,
// add 'font_size - 1' to the height.
SkScalar x = (badge_width - text_width)/2;
SkScalar y = (icon.height() - font_size)/2 + font_size - 1;
- canvas->drawText(badge_text.c_str(), badge_text.size(), x, y, *paint);
+ canvas->sk_canvas()->drawText(
+ badge_text.c_str(), badge_text.size(), x, y, *paint);
// Return the generated image.
return canvas->ExtractBitmap();

Powered by Google App Engine
This is Rietveld 408576698