diff options
author | 2015-02-02 11:19:44 -0800 | |
---|---|---|
committer | 2015-02-02 11:19:44 -0800 | |
commit | efbad37180c6b6f90d4b7e96a234e8065d2ec395 (patch) | |
tree | e8d7c5fd82b78d10d94b2e517116c80033a30755 /src/ports/SkFontConfigParser_android.h | |
parent | 4bf1ce2709f5f4a4850d9b04b3213be732cbdf89 (diff) |
Don't read unecessary font files on Android.
With a new style fonts.xml (version >= 21) fallback fonts are specified
as font families without a name. The current code reads these, but then
also reads in the old fallback and vendor xml files. With this change,
when a new style xml file is encoutered, no further files will be read.
This both lowers memory use and speeds font lookup. Locally, this
change reduces the number of font families loaded on my 'L' device from
148 to 80. All of the families removed are duplicates.
Review URL: https://codereview.chromium.org/888923003
Diffstat (limited to 'src/ports/SkFontConfigParser_android.h')
-rw-r--r-- | src/ports/SkFontConfigParser_android.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ports/SkFontConfigParser_android.h b/src/ports/SkFontConfigParser_android.h index 117a1086fb..5ce53e7777 100644 --- a/src/ports/SkFontConfigParser_android.h +++ b/src/ports/SkFontConfigParser_android.h @@ -94,13 +94,13 @@ namespace SkFontConfigParser { * Parses all system font configuration files and returns the results in an * array of FontFamily structures. */ -void GetFontFamilies(SkTDArray<FontFamily*> &fontFamilies); +void GetFontFamilies(SkTDArray<FontFamily*>& fontFamilies); /** * Parses all test font configuration files and returns the results in an * array of FontFamily structures. */ -void GetTestFontFamilies(SkTDArray<FontFamily*> &fontFamilies, +void GetTestFontFamilies(SkTDArray<FontFamily*>& fontFamilies, const char* testMainConfigFile, const char* testFallbackConfigFile); |