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

Issue 12902021: Auto-generates the font family scripts at build time. (Closed)

Created:
7 years, 9 months ago by bulach
Modified:
7 years, 9 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Auto-generates the font family scripts at build time. On android, this saves heap allocation and startup runtime cost by moving the strings to RO section mmapped in the library. BUG=196559 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=190229

Patch Set 1 #

Patch Set 2 : Cleanup #

Total comments: 4

Patch Set 3 : Uses pre-processor #

Total comments: 4

Patch Set 4 : Comments #

Total comments: 1

Patch Set 5 : Clarify comments #

Total comments: 2

Patch Set 6 : Sort order #

Unified diffs Side-by-side diffs Delta from patch set Stats (+225 lines, -47 lines) Patch
M chrome/browser/ui/prefs/prefs_tab_helper.cc View 1 2 3 4 3 chunks +29 lines, -23 lines 0 comments Download
A chrome/common/pref_font_script_names-inl.h View 1 2 3 1 chunk +163 lines, -0 lines 0 comments Download
A chrome/common/pref_font_webkit_names.h View 1 2 1 chunk +19 lines, -0 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 3 chunks +12 lines, -24 lines 0 comments Download
M chrome/common_constants.gyp View 1 2 3 4 5 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
bulach
the savings here are not that big, it's more of a small tradeoff between heap ...
7 years, 9 months ago (2013-03-19 14:00:35 UTC) #1
Bernhard Bauer
I don't have an opinion on whether this is worth it in terms of resource ...
7 years, 9 months ago (2013-03-19 14:44:51 UTC) #2
bulach
thanks Bernhard! inline: https://codereview.chromium.org/12902021/diff/6/chrome/common/font_family_scripts_generator.cc File chrome/common/font_family_scripts_generator.cc (right): https://codereview.chromium.org/12902021/diff/6/chrome/common/font_family_scripts_generator.cc#newcode13 chrome/common/font_family_scripts_generator.cc:13: // at startup time by using ...
7 years, 9 months ago (2013-03-19 15:35:16 UTC) #3
Bernhard Bauer
https://codereview.chromium.org/12902021/diff/6/chrome/common/font_family_scripts_generator.cc File chrome/common/font_family_scripts_generator.cc (right): https://codereview.chromium.org/12902021/diff/6/chrome/common/font_family_scripts_generator.cc#newcode13 chrome/common/font_family_scripts_generator.cc:13: // at startup time by using RO data section. ...
7 years, 9 months ago (2013-03-19 16:06:38 UTC) #4
bulach
https://codereview.chromium.org/12902021/diff/6/chrome/common/font_family_scripts_generator.cc File chrome/common/font_family_scripts_generator.cc (right): https://codereview.chromium.org/12902021/diff/6/chrome/common/font_family_scripts_generator.cc#newcode13 chrome/common/font_family_scripts_generator.cc:13: // at startup time by using RO data section. ...
7 years, 9 months ago (2013-03-19 16:18:17 UTC) #5
bulach
alright, so following your suggestion, using pre-processor magic :) another look please?
7 years, 9 months ago (2013-03-19 18:08:48 UTC) #6
Bernhard Bauer
LGTM with a nit: https://codereview.chromium.org/12902021/diff/11001/chrome/common/pref_font_script_names-inl.h File chrome/common/pref_font_script_names-inl.h (right): https://codereview.chromium.org/12902021/diff/11001/chrome/common/pref_font_script_names-inl.h#newcode12 chrome/common/pref_font_script_names-inl.h:12: EXPAND_SCRIPT_FONT(x, "Afak") \ Nit: AFAICT, ...
7 years, 9 months ago (2013-03-19 18:22:17 UTC) #7
falken
https://codereview.chromium.org/12902021/diff/11001/chrome/browser/ui/prefs/prefs_tab_helper.cc File chrome/browser/ui/prefs/prefs_tab_helper.cc (right): https://codereview.chromium.org/12902021/diff/11001/chrome/browser/ui/prefs/prefs_tab_helper.cc#newcode126 chrome/browser/ui/prefs/prefs_tab_helper.cc:126: void RegisterFontFamilyMap(PrefRegistrySyncable* registry, Can you update this comment and ...
7 years, 9 months ago (2013-03-19 18:26:04 UTC) #8
bulach
thanks both! all comments addressed, ptal. https://codereview.chromium.org/12902021/diff/11001/chrome/browser/ui/prefs/prefs_tab_helper.cc File chrome/browser/ui/prefs/prefs_tab_helper.cc (right): https://codereview.chromium.org/12902021/diff/11001/chrome/browser/ui/prefs/prefs_tab_helper.cc#newcode126 chrome/browser/ui/prefs/prefs_tab_helper.cc:126: void RegisterFontFamilyMap(PrefRegistrySyncable* registry, ...
7 years, 9 months ago (2013-03-20 11:01:27 UTC) #9
falken
lgtm with a comment https://codereview.chromium.org/12902021/diff/14001/chrome/browser/ui/prefs/prefs_tab_helper.cc File chrome/browser/ui/prefs/prefs_tab_helper.cc (right): https://codereview.chromium.org/12902021/diff/14001/chrome/browser/ui/prefs/prefs_tab_helper.cc#newcode128 chrome/browser/ui/prefs/prefs_tab_helper.cc:128: // as the primary script ...
7 years, 9 months ago (2013-03-20 16:21:17 UTC) #10
bulach
thanks! I updated the comment, would you mind double checking if it's any clearer please? ...
7 years, 9 months ago (2013-03-20 16:32:00 UTC) #11
falken
lgtm On 2013/03/20 16:32:00, bulach wrote: > thanks! I updated the comment, would you mind ...
7 years, 9 months ago (2013-03-20 17:48:22 UTC) #12
jochen (gone - plz use gerrit)
lgtm https://codereview.chromium.org/12902021/diff/22002/chrome/common_constants.gyp File chrome/common_constants.gyp (right): https://codereview.chromium.org/12902021/diff/22002/chrome/common_constants.gyp#newcode33 chrome/common_constants.gyp:33: 'common/pref_font_script_names-inl.h', nit alphabetical ordering
7 years, 9 months ago (2013-03-20 17:49:40 UTC) #13
bulach
thanks jochen! nit addressed, CQing. https://codereview.chromium.org/12902021/diff/22002/chrome/common_constants.gyp File chrome/common_constants.gyp (right): https://codereview.chromium.org/12902021/diff/22002/chrome/common_constants.gyp#newcode33 chrome/common_constants.gyp:33: 'common/pref_font_script_names-inl.h', On 2013/03/20 17:49:40, ...
7 years, 9 months ago (2013-03-21 12:30:45 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12902021/8007
7 years, 9 months ago (2013-03-21 12:31:52 UTC) #15
commit-bot: I haz the power
Retried try job too often on linux_chromeos for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_chromeos&number=95558
7 years, 9 months ago (2013-03-21 14:04:19 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12902021/8007
7 years, 9 months ago (2013-03-21 16:08:05 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12902021/8007
7 years, 9 months ago (2013-03-22 10:01:11 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12902021/8007
7 years, 9 months ago (2013-03-22 16:32:02 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12902021/8007
7 years, 9 months ago (2013-03-22 19:04:05 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/bulach@chromium.org/12902021/8007
7 years, 9 months ago (2013-03-23 15:48:53 UTC) #21
commit-bot: I haz the power
7 years, 9 months ago (2013-03-24 07:07:25 UTC) #22
Message was sent while issue was closed.
Change committed as 190229

Powered by Google App Engine
This is Rietveld 408576698