diff options
author | Mike Reed <reed@google.com> | 2017-10-11 09:51:11 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-11 15:18:57 +0000 |
commit | 4815db5938afe88fa9a7f9ab0df38850b4c0093a (patch) | |
tree | 68a86db157334c027a99746a712c31c42a5a98b1 /src | |
parent | a317a99807ddf66b29a645fa39a5df9caad956fb (diff) |
removed dead code behind legacy fontmgr api flag
Bug: skia:
Change-Id: I7766b10947df384b0e94a32642d5b4321f2e53bd
Reviewed-on: https://skia-review.googlesource.com/58241
Reviewed-by: Ben Wagner <bungeman@google.com>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkFontMgr.cpp | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/src/core/SkFontMgr.cpp b/src/core/SkFontMgr.cpp index 4f18dd25f4..33eb2301bd 100644 --- a/src/core/SkFontMgr.cpp +++ b/src/core/SkFontMgr.cpp @@ -164,56 +164,6 @@ sk_sp<SkTypeface> SkFontMgr::legacyMakeTypeface(const char familyName[], SkFontS return this->onLegacyMakeTypeface(familyName, style); } -#ifdef SK_SUPPORT_LEGACY_FONTMGR_API -SkTypeface* SkFontMgr::createFromData(SkData* data, int ttcIndex) const { - return this->makeFromData(sk_ref_sp(data), ttcIndex).release(); -} -SkTypeface* SkFontMgr::createFromStream(SkStreamAsset* strm, int ttcIndex) const { - return this->makeFromStream(std::unique_ptr<SkStreamAsset>(strm), ttcIndex).release(); -} -SkTypeface* SkFontMgr::createFromStream(SkStreamAsset* strm, const SkFontArguments& args) const { - return this->makeFromStream(std::unique_ptr<SkStreamAsset>(strm), args).release(); -} -SkTypeface* SkFontMgr::createFromFontData(std::unique_ptr<SkFontData> fd) const { - return this->makeFromFontData(std::move(fd)).release(); -} -SkTypeface* SkFontMgr::createFromFile(const char path[], int ttcIndex) const { - return this->makeFromFile(path, ttcIndex).release(); -} -SkTypeface* SkFontMgr::legacyCreateTypeface(const char familyName[], SkFontStyle style) const { - return this->legacyMakeTypeface(familyName, style).release(); -} - -// These implementations are temporary until they can be made pure virtual. -SkTypeface* SkFontMgr::onCreateFromStream(SkStreamAsset* stream, const SkFontArguments& args) const { - return this->makeFromStream(std::unique_ptr<SkStreamAsset>(stream), - args.getCollectionIndex()).release(); -} -SkTypeface* SkFontMgr::onCreateFromFontData(std::unique_ptr<SkFontData> data) const { - return this->makeFromStream(data->detachStream(), data->getIndex()).release(); -} - -sk_sp<SkTypeface> SkFontMgr::onMakeFromData(sk_sp<SkData> data, int ttcIndex) const { - return sk_sp<SkTypeface>(this->onCreateFromData(data.get(), ttcIndex)); -} -sk_sp<SkTypeface> SkFontMgr::onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset> strm, - int ttcIndex) const { - return sk_sp<SkTypeface>(this->onCreateFromStream(strm.release(), ttcIndex)); -} -sk_sp<SkTypeface> SkFontMgr::onMakeFromStreamArgs(std::unique_ptr<SkStreamAsset> strm, - const SkFontArguments& args) const { - return sk_sp<SkTypeface>(onCreateFromStream(strm.release(), args)); -} -sk_sp<SkTypeface> SkFontMgr::onMakeFromFontData(std::unique_ptr<SkFontData> fd) const { - return sk_sp<SkTypeface>(this->onCreateFromFontData(std::move(fd))); -} -sk_sp<SkTypeface> SkFontMgr::onMakeFromFile(const char path[], int ttcIndex) const { - return sk_sp<SkTypeface>(this->onCreateFromFile(path, ttcIndex)); -} -sk_sp<SkTypeface> SkFontMgr::onLegacyMakeTypeface(const char familyName[], SkFontStyle style) const { - return sk_sp<SkTypeface>(this->onLegacyCreateTypeface(familyName, style)); -} -#else sk_sp<SkTypeface> SkFontMgr::onMakeFromStreamArgs(std::unique_ptr<SkStreamAsset> stream, const SkFontArguments& args) const { return this->makeFromStream(std::move(stream), args.getCollectionIndex()); @@ -221,7 +171,6 @@ sk_sp<SkTypeface> SkFontMgr::onMakeFromStreamArgs(std::unique_ptr<SkStreamAsset> sk_sp<SkTypeface> SkFontMgr::onMakeFromFontData(std::unique_ptr<SkFontData> data) const { return this->makeFromStream(data->detachStream(), data->getIndex()); } -#endif sk_sp<SkFontMgr> SkFontMgr::RefDefault() { static SkOnce once; |