Chromium Code Reviews| Index: ui/gfx/platform_font_win.cc |
| diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc |
| index e48bca270efaf4942a72650cb3469ab0c942682d..b514ae2ad9c679e93cbd0c7580bd4b3cc318ea4c 100644 |
| --- a/ui/gfx/platform_font_win.cc |
| +++ b/ui/gfx/platform_font_win.cc |
| @@ -25,6 +25,7 @@ |
| #include "base/win/scoped_hdc.h" |
| #include "base/win/scoped_select_object.h" |
| #include "base/win/win_util.h" |
| +#include "third_party/skia/include/core/SkRefCnt.h" |
| #include "third_party/skia/include/core/SkTypeface.h" |
| #include "ui/gfx/canvas.h" |
| #include "ui/gfx/font.h" |
| @@ -583,7 +584,7 @@ PlatformFontWin::HFontRef* PlatformFontWin::CreateHFontRefFromSkia( |
| DWRITE_FONT_METRICS dwrite_font_metrics = {0}; |
| dwrite_font->GetMetrics(&dwrite_font_metrics); |
| - skia::RefPtr<SkTypeface> skia_face = skia::AdoptRef( |
| + sk_sp<SkTypeface> skia_face( |
| SkTypeface::CreateFromName( |
| base::SysWideToUTF8(font_info.lfFaceName).c_str(), |
| static_cast<SkTypeface::Style>(skia_style))); |
| @@ -599,7 +600,7 @@ PlatformFontWin::HFontRef* PlatformFontWin::CreateHFontRefFromSkia( |
| SkPaint paint; |
| paint.setAntiAlias(font_params.antialiasing); |
| - paint.setTypeface(skia_face.get()); |
| + paint.setTypeface(skia_face); |
|
f(malita)
2016/05/04 15:49:57
std::move(skia_face)
tomhudson
2016/05/04 16:51:54
Done.
|
| paint.setTextSize(-font_info.lfHeight); |
| SkPaint::FontMetrics skia_metrics; |
| paint.getFontMetrics(&skia_metrics); |