| Index: ui/gfx/win/direct_write.cc
|
| diff --git a/ui/gfx/win/direct_write.cc b/ui/gfx/win/direct_write.cc
|
| index bf30f64cc30a7bb990224ba145c282f3cd3f85b0..72bb0e62ffa3d83b403b52187d91ab242e2f0528 100644
|
| --- a/ui/gfx/win/direct_write.cc
|
| +++ b/ui/gfx/win/direct_write.cc
|
| @@ -10,6 +10,7 @@
|
| #include "base/win/scoped_comptr.h"
|
| #include "base/win/windows_version.h"
|
| #include "skia/ext/fontmgr_default_win.h"
|
| +#include "third_party/skia/include/ports/SkFontMgr.h"
|
| #include "third_party/skia/include/ports/SkTypeface_win.h"
|
| #include "ui/gfx/platform_font_win.h"
|
| #include "ui/gfx/switches.h"
|
| @@ -52,10 +53,11 @@ void MaybeInitializeDirectWrite() {
|
| // factory. The GetSystemFontCollection method in the IDWriteFactory
|
| // interface fails with E_INVALIDARG on certain Windows 7 gold versions
|
| // (6.1.7600.*). We should just use GDI in these cases.
|
| - SkFontMgr* direct_write_font_mgr = SkFontMgr_New_DirectWrite(factory.get());
|
| + sk_sp<SkFontMgr> direct_write_font_mgr =
|
| + SkFontMgr_New_DirectWrite(factory.get());
|
| if (!direct_write_font_mgr)
|
| return;
|
| - SetDefaultSkiaFactory(direct_write_font_mgr);
|
| + SetDefaultSkiaFactory(std::move(direct_write_font_mgr));
|
| gfx::PlatformFontWin::SetDirectWriteFactory(factory.get());
|
| }
|
|
|
|
|