Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: ui/gfx/win/direct_write.cc

Issue 2618443002: Remove use of legacy SkFontMgr factories. (Closed)
Patch Set: Forward declare when possible. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/public/web/win/WebFontRendering.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « third_party/WebKit/public/web/win/WebFontRendering.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698