Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(187)

Issue 888923003: Don't read unecessary font files on Android. (Closed)

Created:
5 years, 10 months ago by bungeman-skia
Modified:
5 years, 10 months ago
Reviewers:
djsollen, mtklein, tomhudson
CC:
reviews_skia.org
Base URL:
https://skia.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

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. Committed: https://skia.googlesource.com/skia/+/efbad37180c6b6f90d4b7e96a234e8065d2ec395

Patch Set 1 #

Patch Set 2 : Rebase after spliting out other changes. #

Patch Set 3 : Make usage more obvious. #

Total comments: 2

Patch Set 4 : Snake case the statics. #

Patch Set 5 : Move reference & to type. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+53 lines, -43 lines) Patch
M src/ports/SkFontConfigParser_android.h View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M src/ports/SkFontConfigParser_android.cpp View 1 2 3 4 18 chunks +51 lines, -41 lines 0 comments Download

Messages

Total messages: 14 (4 generated)
bungeman-skia
Also updates the dumping code so I could make sure nothing changed there.
5 years, 10 months ago (2015-01-30 21:56:38 UTC) #2
bungeman-skia
Now that the other changes have landed, this one can.
5 years, 10 months ago (2015-02-02 16:32:04 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/888923003/40001
5 years, 10 months ago (2015-02-02 16:43:11 UTC) #6
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 10 months ago (2015-02-02 16:43:12 UTC) #7
mtklein
https://codereview.chromium.org/888923003/diff/40001/src/ports/SkFontConfigParser_android.cpp File src/ports/SkFontConfigParser_android.cpp (right): https://codereview.chromium.org/888923003/diff/40001/src/ports/SkFontConfigParser_android.cpp#newcode427 src/ports/SkFontConfigParser_android.cpp:427: static int appendSystemFontFamilies(SkTDArray<FontFamily*> &fontFamilies) { Let's update to static_function_name_style ...
5 years, 10 months ago (2015-02-02 16:55:49 UTC) #8
bungeman-skia
https://codereview.chromium.org/888923003/diff/40001/src/ports/SkFontConfigParser_android.cpp File src/ports/SkFontConfigParser_android.cpp (right): https://codereview.chromium.org/888923003/diff/40001/src/ports/SkFontConfigParser_android.cpp#newcode427 src/ports/SkFontConfigParser_android.cpp:427: static int appendSystemFontFamilies(SkTDArray<FontFamily*> &fontFamilies) { On 2015/02/02 16:55:49, mtklein ...
5 years, 10 months ago (2015-02-02 18:36:37 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/888923003/80001
5 years, 10 months ago (2015-02-02 18:40:52 UTC) #11
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
5 years, 10 months ago (2015-02-02 18:40:53 UTC) #12
mtklein
lgtm
5 years, 10 months ago (2015-02-02 18:45:58 UTC) #13
commit-bot: I haz the power
5 years, 10 months ago (2015-02-02 19:19:48 UTC) #14
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as
https://skia.googlesource.com/skia/+/efbad37180c6b6f90d4b7e96a234e8065d2ec395

Powered by Google App Engine
This is Rietveld 408576698