diff options
author | Ben Wagner <bungeman@google.com> | 2017-01-11 13:54:39 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-11 19:50:14 +0000 |
commit | 20d031a6ad7853eec166a4a648c09b12e4f32008 (patch) | |
tree | 0bb75cd2b3e1e18e87641894123308f609d6f606 /src/ports/SkFontMgr_win_dw.cpp | |
parent | d50fd8c18989fd4209dbfe40d24e5060c04f6d8c (diff) |
Remove SK_LEGACY_FONTMGR_FACTORY.
SkFontMgr factories now return sk_sp and the legacy factories are no
longer used and can be removed.
BUG=skia:5077
Change-Id: Ieaff8555b297d1db157f8b78cdd6e7d07a3b5490
Reviewed-on: https://skia-review.googlesource.com/6894
Commit-Queue: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
Diffstat (limited to 'src/ports/SkFontMgr_win_dw.cpp')
-rw-r--r-- | src/ports/SkFontMgr_win_dw.cpp | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/src/ports/SkFontMgr_win_dw.cpp b/src/ports/SkFontMgr_win_dw.cpp index 29069f069e..905f413693 100644 --- a/src/ports/SkFontMgr_win_dw.cpp +++ b/src/ports/SkFontMgr_win_dw.cpp @@ -1043,22 +1043,14 @@ SkTypeface* SkFontStyleSet_DirectWrite::matchStyle(const SkFontStyle& pattern) { //////////////////////////////////////////////////////////////////////////////// #include "SkTypeface_win.h" -#ifdef SK_LEGACY_FONTMGR_FACTORY -SK_API SkFontMgr* SkFontMgr_New_DirectWrite(IDWriteFactory* factory, -#else SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWrite(IDWriteFactory* factory, -#endif - IDWriteFontCollection* collection) { + IDWriteFontCollection* collection) { return SkFontMgr_New_DirectWrite(factory, collection, nullptr); } -#ifdef SK_LEGACY_FONTMGR_FACTORY -SK_API SkFontMgr* SkFontMgr_New_DirectWrite(IDWriteFactory* factory, -#else SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWrite(IDWriteFactory* factory, -#endif - IDWriteFontCollection* collection, - IDWriteFontFallback* fallback) { + IDWriteFontCollection* collection, + IDWriteFontFallback* fallback) { if (nullptr == factory) { factory = sk_get_dwrite_factory(); if (nullptr == factory) { @@ -1089,28 +1081,16 @@ SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWrite(IDWriteFactory* factory, }; } -#ifdef SK_LEGACY_FONTMGR_FACTORY - return new SkFontMgr_DirectWrite(factory, collection, fallback, localeName, localeNameLen); -#else return sk_make_sp<SkFontMgr_DirectWrite>(factory, collection, fallback, localeName, localeNameLen); -#endif } #include "SkFontMgr_indirect.h" -#ifdef SK_LEGACY_FONTMGR_FACTORY -SK_API SkFontMgr* SkFontMgr_New_DirectWriteRenderer(sk_sp<SkRemotableFontMgr> proxy) { -#else SK_API sk_sp<SkFontMgr> SkFontMgr_New_DirectWriteRenderer(sk_sp<SkRemotableFontMgr> proxy) { -#endif sk_sp<SkFontMgr> impl(SkFontMgr_New_DirectWrite()); if (!impl) { return nullptr; } -#ifdef SK_LEGACY_FONTMGR_FACTORY - return new SkFontMgr_Indirect(std::move(impl), std::move(proxy)); -#else return sk_make_sp<SkFontMgr_Indirect>(std::move(impl), std::move(proxy)); -#endif } #endif//defined(SK_BUILD_FOR_WIN32) |