| Index: ui/gfx/platform_font_win.cc
|
| diff --git a/ui/gfx/platform_font_win.cc b/ui/gfx/platform_font_win.cc
|
| index 35e170c9979a171a1f0ce1e45ebfeeab6b2f9ed3..e039d08717bed85e5ed4483d8b4391161191745d 100644
|
| --- a/ui/gfx/platform_font_win.cc
|
| +++ b/ui/gfx/platform_font_win.cc
|
| @@ -26,6 +26,7 @@
|
| #include "base/win/scoped_select_object.h"
|
| #include "base/win/win_util.h"
|
| #include "third_party/skia/include/core/SkFontLCDConfig.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"
|
| @@ -584,7 +585,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)));
|
| @@ -600,7 +601,7 @@ PlatformFontWin::HFontRef* PlatformFontWin::CreateHFontRefFromSkia(
|
|
|
| SkPaint paint;
|
| paint.setAntiAlias(font_params.antialiasing);
|
| - paint.setTypeface(skia_face.get());
|
| + paint.setTypeface(std::move(skia_face));
|
| paint.setTextSize(-font_info.lfHeight);
|
| SkPaint::FontMetrics skia_metrics;
|
| paint.getFontMetrics(&skia_metrics);
|
|
|