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

Issue 1685053002: blink fonts: Load Android SkFontMgr on Linux. (Closed)

Created:
4 years, 10 months ago by Khushal
Modified:
4 years, 9 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, creis+watch_chromium.org, danakj+watch_chromium.org, darin-cc_chromium.org, dglazkov+blink, dshwang, drott+blinkwatch_chromium.org, krit, David Trainor- moved to gerrit, f(malita), jam, jbroman, Justin Novosad, kinuko+watch, nasko+codewatch_chromium.org, pdr+graphicswatchlist_chromium.org, rickyz+watch_chromium.org, rwlbuis, Stephen Chennney, vmpstr+blinkwatch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@windows_change
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

blink fonts: Load Android SkFontMgr on Linux. The renderer running on the engine for blimp uses the linux font config, while it needs to support the use of android fonts when connected to an android client. The patch includes 2 changes necessary for this. 1) The default mode for the android SkFontMgr accesses files on disk which is not possible in the renderer sandbox. So we create the font manager in the zygote process, before initializing the sanbox. The font manager uses the isolated mode, so it can acquire all necessary resources on initialization and does not perform any disk I/O after it. 2) Add an API to blink::WebFontRendering on linux to override the default font manager. This allows us to override the default behaviour in FontCacheSkia for linux to direct all queries for fallback fonts to the embedder provided font manager. BUG=585668 Committed: https://crrev.com/12a558c16f853751ab702c84fbd0ffd7de565cdc Cr-Commit-Position: refs/heads/master@{#379631}

Patch Set 1 #

Patch Set 2 : Rebase. #

Total comments: 4

Patch Set 3 : Initialize m_fontManager to nullptr. #

Patch Set 4 : Fix gyp build for chrome-os. #

Patch Set 5 : Build fix. #

Patch Set 6 : Add comments. #

Total comments: 9

Patch Set 7 : Addressed nyquist's comments. #

Total comments: 6

Patch Set 8 : Addressed rickyz's comments. #

Patch Set 9 : Rebase. #

Total comments: 4

Patch Set 10 : Addressed comments. #

Patch Set 11 : Rebase #

Patch Set 12 : Fix rebase. #

Patch Set 13 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+175 lines, -68 lines) Patch
M content/browser/renderer_host/render_process_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/zygote_host/zygote_communication_linux.cc View 1 2 3 4 5 6 1 chunk +2 lines, -1 line 0 comments Download
M content/public/common/content_switches.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_switches.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -0 lines 0 comments Download
M content/zygote/zygote_main_linux.cc View 1 2 3 4 5 6 7 2 chunks +26 lines, -0 lines 0 comments Download
M skia/BUILD.gn View 1 2 chunks +10 lines, -0 lines 0 comments Download
M skia/skia_library.gypi View 1 2 3 4 2 chunks +9 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontCache.h View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +11 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontCache.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +5 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/android/FontCacheAndroid.cpp View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -55 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/linux/FontCacheLinux.cpp View 1 2 3 4 5 6 7 8 9 10 2 chunks +22 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +69 lines, -1 line 0 comments Download
M third_party/WebKit/Source/web/linux/WebFontRendering.cpp View 1 2 chunks +8 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/linux/WebFontRendering.h View 2 chunks +2 lines, -0 lines 0 comments Download

Messages

Total messages: 72 (30 generated)
Khushal
Ben, could you take a look at this? This depends on a similiar change to ...
4 years, 10 months ago (2016-02-10 04:31:46 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685053002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685053002/20001
4 years, 10 months ago (2016-02-17 18:40:41 UTC) #6
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/94458) chromeos_daisy_chromium_compile_only_ng on ...
4 years, 10 months ago (2016-02-17 19:00:42 UTC) #8
eae
https://codereview.chromium.org/1685053002/diff/20001/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp File third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp (right): https://codereview.chromium.org/1685053002/diff/20001/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp#newcode108 third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp:108: #if OS(ANDROID) || OS(LINUX) Do we need this on ...
4 years, 10 months ago (2016-02-17 23:52:10 UTC) #10
Khushal
https://codereview.chromium.org/1685053002/diff/20001/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp File third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp (right): https://codereview.chromium.org/1685053002/diff/20001/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp#newcode108 third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp:108: #if OS(ANDROID) || OS(LINUX) On 2016/02/17 23:52:10, eae wrote: ...
4 years, 10 months ago (2016-02-18 00:46:37 UTC) #11
eae
On 2016/02/18 00:46:37, Khushal wrote: > https://codereview.chromium.org/1685053002/diff/20001/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp > File third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp (right): > > https://codereview.chromium.org/1685053002/diff/20001/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp#newcode108 > ...
4 years, 10 months ago (2016-02-18 17:57:01 UTC) #12
Khushal
On 2016/02/18 17:57:01, eae wrote: > On 2016/02/18 00:46:37, Khushal wrote: > > > https://codereview.chromium.org/1685053002/diff/20001/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp ...
4 years, 10 months ago (2016-02-18 22:37:17 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685053002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685053002/60001
4 years, 10 months ago (2016-02-19 03:20:14 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/161003)
4 years, 10 months ago (2016-02-19 04:02:01 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685053002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685053002/80001
4 years, 10 months ago (2016-02-19 09:11:44 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/25756)
4 years, 10 months ago (2016-02-19 13:07:04 UTC) #21
eae
On 2016/02/18 22:37:17, Khushal wrote: > On 2016/02/18 17:57:01, eae wrote: > > On 2016/02/18 ...
4 years, 10 months ago (2016-02-22 18:34:31 UTC) #22
Khushal
On 2016/02/22 18:34:31, eae wrote: > On 2016/02/18 22:37:17, Khushal wrote: > > On 2016/02/18 ...
4 years, 10 months ago (2016-02-22 20:58:07 UTC) #23
Khushal
4 years, 10 months ago (2016-02-22 20:58:53 UTC) #25
Khushal
+rickyz for content/zygote, +seivers for content/common and content/browser +reed2 for skia/
4 years, 10 months ago (2016-02-22 21:01:59 UTC) #27
no sievers
https://codereview.chromium.org/1685053002/diff/100001/content/zygote/zygote_main_linux.cc File content/zygote/zygote_main_linux.cc (right): https://codereview.chromium.org/1685053002/diff/100001/content/zygote/zygote_main_linux.cc#newcode49 content/zygote/zygote_main_linux.cc:49: #include "third_party/WebKit/public/web/linux/WebFontRendering.h" Although there is no DEPS file, it ...
4 years, 10 months ago (2016-02-22 22:27:20 UTC) #29
eae
LGTM
4 years, 10 months ago (2016-02-22 22:56:47 UTC) #31
Khushal
https://codereview.chromium.org/1685053002/diff/100001/content/zygote/zygote_main_linux.cc File content/zygote/zygote_main_linux.cc (right): https://codereview.chromium.org/1685053002/diff/100001/content/zygote/zygote_main_linux.cc#newcode71 content/zygote/zygote_main_linux.cc:71: #include "third_party/skia/include/ports/SkFontMgr_android.h" On 2016/02/22 22:27:20, sievers wrote: > Is ...
4 years, 10 months ago (2016-02-22 23:46:00 UTC) #32
Khushal
+pfeldman@chromium.org for WebKit/public.
4 years, 10 months ago (2016-02-22 23:47:59 UTC) #34
pfeldman
lgtm
4 years, 10 months ago (2016-02-23 23:22:09 UTC) #35
nyquist
https://codereview.chromium.org/1685053002/diff/100001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/1685053002/diff/100001/content/public/common/content_switches.cc#newcode43 content/public/common/content_switches.cc:43: const char kAndroidFontsLocation[] = "android-fonts-location"; Question from a CL ...
4 years, 10 months ago (2016-02-25 01:13:10 UTC) #37
Khushal
https://codereview.chromium.org/1685053002/diff/100001/content/public/common/content_switches.cc File content/public/common/content_switches.cc (right): https://codereview.chromium.org/1685053002/diff/100001/content/public/common/content_switches.cc#newcode43 content/public/common/content_switches.cc:43: const char kAndroidFontsLocation[] = "android-fonts-location"; On 2016/02/25 01:13:10, nyquist ...
4 years, 10 months ago (2016-02-25 02:17:47 UTC) #38
rickyz (no longer on Chrome)
Zygote changes lgtm, but would be good to see if jln@ has any additional comments. ...
4 years, 10 months ago (2016-02-25 23:56:56 UTC) #39
Khushal
Done. Thanks ricky! https://codereview.chromium.org/1685053002/diff/120001/content/zygote/zygote_main_linux.cc File content/zygote/zygote_main_linux.cc (right): https://codereview.chromium.org/1685053002/diff/120001/content/zygote/zygote_main_linux.cc#newcode71 content/zygote/zygote_main_linux.cc:71: #include "third_party/skia/include/ports/SkFontMgr_android.h" On 2016/02/25 23:56:56, rickyz ...
4 years, 9 months ago (2016-02-26 19:21:36 UTC) #40
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685053002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685053002/160001
4 years, 9 months ago (2016-02-26 22:36:11 UTC) #42
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/163141)
4 years, 9 months ago (2016-02-26 23:29:17 UTC) #44
Khushal
friendly ping for skia/ review. :)
4 years, 9 months ago (2016-02-29 21:58:16 UTC) #45
bungeman-chromium
https://codereview.chromium.org/1685053002/diff/160001/third_party/WebKit/Source/platform/fonts/FontCache.cpp File third_party/WebKit/Source/platform/fonts/FontCache.cpp (right): https://codereview.chromium.org/1685053002/diff/160001/third_party/WebKit/Source/platform/fonts/FontCache.cpp#newcode65 third_party/WebKit/Source/platform/fonts/FontCache.cpp:65: m_fontManager(nullptr) nit: indentation here is odd https://codereview.chromium.org/1685053002/diff/160001/third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp File third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp ...
4 years, 9 months ago (2016-02-29 22:48:50 UTC) #46
Khushal
Done. Thanks Ben! https://codereview.chromium.org/1685053002/diff/160001/third_party/WebKit/Source/platform/fonts/FontCache.cpp File third_party/WebKit/Source/platform/fonts/FontCache.cpp (right): https://codereview.chromium.org/1685053002/diff/160001/third_party/WebKit/Source/platform/fonts/FontCache.cpp#newcode65 third_party/WebKit/Source/platform/fonts/FontCache.cpp:65: m_fontManager(nullptr) On 2016/02/29 22:48:50, bungeman2 wrote: ...
4 years, 9 months ago (2016-03-01 18:52:44 UTC) #47
bungeman-chromium
lgtm
4 years, 9 months ago (2016-03-01 20:09:48 UTC) #48
bungeman-skia
On 2016/03/01 20:09:48, bungeman2 wrote: > lgtm OWNER lgtm too
4 years, 9 months ago (2016-03-01 20:10:21 UTC) #49
jln (very slow on Chromium)
I won't be able to go through this, so I'm fine with it given rickyz@'s ...
4 years, 9 months ago (2016-03-01 22:12:52 UTC) #51
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685053002/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685053002/180001
4 years, 9 months ago (2016-03-04 20:46:55 UTC) #53
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/31553) android_chromium_gn_compile_dbg on ...
4 years, 9 months ago (2016-03-04 20:51:38 UTC) #55
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685053002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685053002/220001
4 years, 9 months ago (2016-03-05 01:49:37 UTC) #57
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-05 03:09:33 UTC) #59
no sievers
lgtm
4 years, 9 months ago (2016-03-07 18:44:35 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685053002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685053002/220001
4 years, 9 months ago (2016-03-07 18:46:08 UTC) #63
commit-bot: I haz the power
Try jobs failed on following builders: android_arm64_dbg_recipe on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/android_arm64_dbg_recipe/builds/32136) android_compile_dbg on tryserver.chromium.android (JOB_FAILED, ...
4 years, 9 months ago (2016-03-07 18:50:24 UTC) #65
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1685053002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1685053002/240001
4 years, 9 months ago (2016-03-07 19:03:35 UTC) #68
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 9 months ago (2016-03-07 20:35:37 UTC) #70
commit-bot: I haz the power
4 years, 9 months ago (2016-03-07 20:37:13 UTC) #72
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/12a558c16f853751ab702c84fbd0ffd7de565cdc
Cr-Commit-Position: refs/heads/master@{#379631}

Powered by Google App Engine
This is Rietveld 408576698