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>
This commit is contained in:
parent
f2956459f7
commit
0ab977f231
@ -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 {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user