| Index: chrome/common/badge_util.cc
|
| ===================================================================
|
| --- chrome/common/badge_util.cc (revision 82144)
|
| +++ chrome/common/badge_util.cc (working copy)
|
| @@ -83,8 +83,8 @@
|
| badge_width--;
|
|
|
| // Render the badge bitmap and overlay into a canvas.
|
| - scoped_ptr<gfx::CanvasSkia> canvas(
|
| - new gfx::CanvasSkia(badge_width, icon.height(), false));
|
| + scoped_ptr<gfx::CanvasSkia> canvas(new gfx::CanvasSkia);
|
| + canvas->Init(badge_width, icon.height(), false);
|
| canvas->DrawBitmapInt(icon, 0, 0);
|
|
|
| // Draw the text overlay centered horizontally and vertically. Skia expects
|
| @@ -92,7 +92,8 @@
|
| // 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->skia_canvas()->drawText(
|
| + badge_text.c_str(), badge_text.size(), x, y, *paint);
|
|
|
| // Return the generated image.
|
| return canvas->ExtractBitmap();
|
|
|