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

Issue 1673373003: Add support for caching font files in the Android SkFontMgr. (Closed)

Created:
4 years, 10 months ago by Khushal
Modified:
4 years, 10 months ago
CC:
reviews_skia.org, David Trainor- moved to gerrit
Base URL:
https://chromium.googlesource.com/skia.git@master
Target Ref:
refs/heads/master
Project:
skia
Visibility:
Public.

Description

Add support for caching font files in the Android SkFontMgr. SkFontMgr_Android lazily access font files from disk, which is not possible when it is used in the renderer sandbox on Linux. Add a flag to SkFontMgr_Android_CustomFonts for caching readonly FILE streams when creating the font mgr. Since the font mgr is created before the sandbox is initialized, it can access these files on initialization, and use these cached streams safely for its lifetime. Committed: https://skia.googlesource.com/skia/+/ebc465b8f271f362015fdf352b8355989e59a3f3

Patch Set 1 #

Total comments: 16

Patch Set 2 : Addressed comments. #

Total comments: 15

Patch Set 3 : Addressed comments. #

Patch Set 4 : Add enclosing brackets for if statement. #

Total comments: 2

Patch Set 5 : Remove unnecessary fIsolated var. #

Total comments: 3

Patch Set 6 : Addressed comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -11 lines) Patch
M include/ports/SkFontMgr_android.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M src/ports/SkFontMgr_android.cpp View 1 2 3 4 5 11 chunks +27 lines, -10 lines 0 comments Download
M src/ports/SkFontMgr_android_factory.cpp View 1 2 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 37 (17 generated)
Khushal
4 years, 10 months ago (2016-02-08 21:16:14 UTC) #4
bungeman-skia
https://codereview.chromium.org/1673373003/diff/1/include/ports/SkFontMgr_android.h File include/ports/SkFontMgr_android.h (right): https://codereview.chromium.org/1673373003/diff/1/include/ports/SkFontMgr_android.h#newcode46 include/ports/SkFontMgr_android.h:46: bool fCacheFontFiles; I'm not sure I like the naming ...
4 years, 10 months ago (2016-02-08 22:11:57 UTC) #6
Khushal
Done. Thanks Ben. Could you take another look? https://codereview.chromium.org/1673373003/diff/1/include/ports/SkFontMgr_android.h File include/ports/SkFontMgr_android.h (right): https://codereview.chromium.org/1673373003/diff/1/include/ports/SkFontMgr_android.h#newcode46 include/ports/SkFontMgr_android.h:46: bool ...
4 years, 10 months ago (2016-02-09 00:53:40 UTC) #7
Khushal
friendly ping. :)
4 years, 10 months ago (2016-02-11 18:18:07 UTC) #8
bungeman-skia
https://codereview.chromium.org/1673373003/diff/20001/src/ports/SkFontMgr_android.cpp File src/ports/SkFontMgr_android.cpp (right): https://codereview.chromium.org/1673373003/diff/20001/src/ports/SkFontMgr_android.cpp#newcode70 src/ports/SkFontMgr_android.cpp:70: , fFile( Skia allows up to 100 character lines, ...
4 years, 10 months ago (2016-02-11 20:06:09 UTC) #10
Khushal
https://codereview.chromium.org/1673373003/diff/20001/src/ports/SkFontMgr_android.cpp File src/ports/SkFontMgr_android.cpp (right): https://codereview.chromium.org/1673373003/diff/20001/src/ports/SkFontMgr_android.cpp#newcode70 src/ports/SkFontMgr_android.cpp:70: , fFile( On 2016/02/11 20:06:09, bungeman1 wrote: > Skia ...
4 years, 10 months ago (2016-02-12 04:54:07 UTC) #11
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673373003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673373003/40001
4 years, 10 months ago (2016-02-12 04:55:54 UTC) #13
commit-bot: I haz the power
Note for Reviewers: The CQ is waiting for an approval. If you believe that the ...
4 years, 10 months ago (2016-02-12 04:55:56 UTC) #14
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: Build-Ubuntu-GCC-x86_64-Release-Trybot on client.skia.compile (JOB_FAILED, http://build.chromium.org/p/client.skia.compile/builders/Build-Ubuntu-GCC-x86_64-Release-Trybot/builds/6122)
4 years, 10 months ago (2016-02-12 04:57:24 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673373003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673373003/60001
4 years, 10 months ago (2016-02-12 05:21:08 UTC) #18
commit-bot: I haz the power
Dry run: No LGTM from a valid reviewer yet. Please ask for an LGTM from ...
4 years, 10 months ago (2016-02-12 10:55:00 UTC) #20
bungeman-skia
One last thing... https://codereview.chromium.org/1673373003/diff/20001/src/ports/SkFontMgr_android.cpp File src/ports/SkFontMgr_android.cpp (right): https://codereview.chromium.org/1673373003/diff/20001/src/ports/SkFontMgr_android.cpp#newcode549 src/ports/SkFontMgr_android.cpp:549: if (typeface || !fIsolated) On 2016/02/12 ...
4 years, 10 months ago (2016-02-12 15:13:47 UTC) #21
Khushal
Thanks Ben. Done. https://codereview.chromium.org/1673373003/diff/60001/src/ports/SkFontMgr_android.cpp File src/ports/SkFontMgr_android.cpp (right): https://codereview.chromium.org/1673373003/diff/60001/src/ports/SkFontMgr_android.cpp#newcode559 src/ports/SkFontMgr_android.cpp:559: const bool fIsolated; On 2016/02/12 15:13:47, ...
4 years, 10 months ago (2016-02-12 18:24:13 UTC) #22
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673373003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673373003/80001
4 years, 10 months ago (2016-02-12 18:55:36 UTC) #24
bungeman-skia
The implementation part of this lgtm with one nit. This does touch a public API, ...
4 years, 10 months ago (2016-02-12 18:59:35 UTC) #26
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 10 months ago (2016-02-12 19:24:02 UTC) #28
Khushal
https://codereview.chromium.org/1673373003/diff/80001/src/ports/SkFontMgr_android.cpp File src/ports/SkFontMgr_android.cpp (right): https://codereview.chromium.org/1673373003/diff/80001/src/ports/SkFontMgr_android.cpp#newcode326 src/ports/SkFontMgr_android.cpp:326: { On 2016/02/12 18:59:35, bungeman1 wrote: > nit: this ...
4 years, 10 months ago (2016-02-12 19:34:17 UTC) #29
reed1
lgtm
4 years, 10 months ago (2016-02-12 20:08:02 UTC) #30
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1673373003/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1673373003/100001
4 years, 10 months ago (2016-02-12 20:09:06 UTC) #34
commit-bot: I haz the power
4 years, 10 months ago (2016-02-12 20:42:52 UTC) #37
Message was sent while issue was closed.
Committed patchset #6 (id:100001) as
https://skia.googlesource.com/skia/+/ebc465b8f271f362015fdf352b8355989e59a3f3

Powered by Google App Engine
This is Rietveld 408576698