| 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..e36fe9d59e44871c9bac20d429c24b56140bd829 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(std::move(skia_face));
|
| paint.setTextSize(-font_info.lfHeight);
|
| SkPaint::FontMetrics skia_metrics;
|
| paint.getFontMetrics(&skia_metrics);
|
|
|