Chromium Code Reviews| Index: ui/gfx/canvas_mac.mm |
| diff --git a/ui/gfx/canvas_mac.mm b/ui/gfx/canvas_mac.mm |
| index 2b8f39e6d21f6c386ccba5f9e4fe88ca5b4822a8..12e44ebdbc9302a90829b7551d82f5032db6262f 100644 |
| --- a/ui/gfx/canvas_mac.mm |
| +++ b/ui/gfx/canvas_mac.mm |
| @@ -59,11 +59,10 @@ void Canvas::DrawStringWithShadows(const string16& text, |
| const ShadowValues& shadows) { |
| DLOG_IF(WARNING, !shadows.empty()) << "Text shadow not implemented."; |
| - SkTypeface* typeface = SkTypeface::CreateFromName(font.GetFontName().c_str(), |
| - FontTypefaceStyle(font)); |
| + skia::RefPtr<SkTypeface> typeface = SkTypeface::CreateFromName( |
|
sky
2012/12/03 15:28:49
Is it just me, or is it very mysterious as to when
danakj
2012/12/03 17:00:19
Oh, this should adopt. It's based on an old CL, an
|
| + font.GetFontName().c_str(), FontTypefaceStyle(font)); |
| SkPaint paint; |
| - paint.setTypeface(typeface); |
| - typeface->unref(); |
| + paint.setTypeface(typeface.get()); |
| paint.setColor(color); |
| canvas_->drawText(text.c_str(), |
| text.size() * sizeof(string16::value_type), |