diff options
author | Ben Wagner <bungeman@google.com> | 2017-01-09 16:23:44 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-01-10 16:20:05 +0000 |
commit | 0ab977f2314d0b5ec0067fb5d6ececc21de6d2ab (patch) | |
tree | a3e01a61b9fce201843f3e493a338a9277a96cfc | |
parent | f2956459f707de596dcb2c79a7ee1fa62d599c0d (diff) |
Remove SkUseTestFontConfigFile.
This method and its associated globals are no longer used by any user
and can now be removed.
BUG=skia:2817
Change-Id: Ia627e2494f568a733999b980aec9284467d2640d
Reviewed-on: https://skia-review.googlesource.com/6821
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
-rw-r--r-- | include/ports/SkFontMgr_android.h | 7 | ||||
-rw-r--r-- | src/ports/SkFontMgr_android_factory.cpp | 31 |
2 files changed, 0 insertions, 38 deletions
diff --git a/include/ports/SkFontMgr_android.h b/include/ports/SkFontMgr_android.h index 9ed435dc0d..ee73a4b717 100644 --- a/include/ports/SkFontMgr_android.h +++ b/include/ports/SkFontMgr_android.h @@ -12,13 +12,6 @@ class SkFontMgr; -/** - * For test only -- this only affects the default factory. - * Load font config from given xml files, instead of those from Android system. - */ -SK_API void SkUseTestFontConfigFile(const char* mainconf, const char* fallbackconf, - const char* fontsdir); - struct SkFontMgr_Android_CustomFonts { /** When specifying custom fonts, indicates how to use system fonts. */ enum SystemFontUse { diff --git a/src/ports/SkFontMgr_android_factory.cpp b/src/ports/SkFontMgr_android_factory.cpp index 74bcef2de5..281b5b8bb5 100644 --- a/src/ports/SkFontMgr_android_factory.cpp +++ b/src/ports/SkFontMgr_android_factory.cpp @@ -10,42 +10,11 @@ #include "SkFontMgr.h" #include "SkFontMgr_android.h" -// For test only. -static const char* gTestFontsXml = nullptr; -static const char* gTestFallbackFontsXml = nullptr; -static const char* gTestBasePath = nullptr; - -void SkUseTestFontConfigFile(const char* fontsXml, const char* fallbackFontsXml, - const char* basePath) -{ - gTestFontsXml = fontsXml; - gTestFallbackFontsXml = fallbackFontsXml; - gTestBasePath = basePath; - SkASSERT(gTestFontsXml); - SkASSERT(gTestFallbackFontsXml); - SkASSERT(gTestBasePath); - SkDEBUGF(("Test BasePath: %s Fonts: %s FallbackFonts: %s\n", - gTestBasePath, gTestFontsXml, gTestFallbackFontsXml)); -} - #ifdef SK_LEGACY_FONTMGR_FACTORY SkFontMgr* SkFontMgr::Factory() { #else sk_sp<SkFontMgr> SkFontMgr::Factory() { #endif - // These globals exist so that Chromium can override the environment. - // TODO: these globals need to be removed, and Chromium use SkFontMgr_New_Android instead. - if ((gTestFontsXml || gTestFallbackFontsXml) && gTestBasePath) { - SkFontMgr_Android_CustomFonts custom = { - SkFontMgr_Android_CustomFonts::kOnlyCustom, - gTestBasePath, - gTestFontsXml, - gTestFallbackFontsXml, - false /* fIsolated */ - }; - return SkFontMgr_New_Android(&custom); - } - return SkFontMgr_New_Android(nullptr); } |