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

Issue 124693003: Makes the default ctor of gfx::FontList copy the pre-calculated metrics. (Closed)

Created:
6 years, 11 months ago by Yuki
Modified:
6 years, 11 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Makes the default ctor of gfx::FontList copy the pre-calculated metrics. Every instance of default-constructed FontList has been calling CacheCommonFontHeightAndBaseline() and CacheFontStyleAndSize(), and it's inefficient. This CL creates an instance of FontList which holds pre-calculated metrics, and copy the pre-calculated metrics in the default ctor. This change improves the performance very much. BUG=330975 TEST=Run unit_tests, views_unittests, ui_unittests. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=244446

Patch Set 1 #

Patch Set 2 : #

Total comments: 6

Patch Set 3 : Addressed Mike's comments. #

Patch Set 4 : Synced. #

Patch Set 5 : Synced. #

Patch Set 6 : Moved the creation of |g_default_font_list| into the default ctor. #

Total comments: 2

Patch Set 7 : Added a comment. #

Patch Set 8 : Synced. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -4 lines) Patch
M ui/gfx/font_list.h View 1 chunk +2 lines, -1 line 0 comments Download
M ui/gfx/font_list.cc View 1 2 3 4 5 6 3 chunks +24 lines, -3 lines 2 comments Download

Messages

Total messages: 28 (0 generated)
Yuki
Could you guys review this CL? tony@ as the owner of /ui/base/resource/resource_bundle.cc asvitkine@ and msw@ ...
6 years, 11 months ago (2014-01-07 09:59:53 UTC) #1
tony
ui/base/resource LGTM
6 years, 11 months ago (2014-01-07 17:30:00 UTC) #2
msw
LGTM with nits. https://codereview.chromium.org/124693003/diff/20001/ui/gfx/font_list.cc File ui/gfx/font_list.cc (right): https://codereview.chromium.org/124693003/diff/20001/ui/gfx/font_list.cc#newcode88 ui/gfx/font_list.cc:88: // Copy the default font list ...
6 years, 11 months ago (2014-01-07 17:51:38 UTC) #3
Alexei Svitkine (slow)
lgtm
6 years, 11 months ago (2014-01-07 21:56:23 UTC) #4
Yuki
Thanks for the reviews. If you have more comments, let me address them in a ...
6 years, 11 months ago (2014-01-08 06:32:18 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/124693003/90001
6 years, 11 months ago (2014-01-08 06:33:11 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/124693003/90001
6 years, 11 months ago (2014-01-08 06:47:27 UTC) #7
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) base_unittests, browser_tests, content_browsertests, interactive_ui_tests, nacl_integration, net_unittests, ...
6 years, 11 months ago (2014-01-08 08:29:22 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/124693003/390001
6 years, 11 months ago (2014-01-08 09:00:10 UTC) #9
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) sync_integration_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=211188
6 years, 11 months ago (2014-01-08 09:46:18 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/124693003/390001
6 years, 11 months ago (2014-01-08 12:28:05 UTC) #11
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=211234
6 years, 11 months ago (2014-01-08 13:33:07 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/124693003/390001
6 years, 11 months ago (2014-01-08 15:53:13 UTC) #13
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=211302
6 years, 11 months ago (2014-01-08 16:55:37 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/124693003/810001
6 years, 11 months ago (2014-01-09 02:59:04 UTC) #15
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=211836
6 years, 11 months ago (2014-01-09 03:42:48 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/124693003/810001
6 years, 11 months ago (2014-01-09 05:19:08 UTC) #17
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=211941
6 years, 11 months ago (2014-01-09 06:23:00 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/124693003/1210001
6 years, 11 months ago (2014-01-09 15:18:53 UTC) #19
commit-bot: I haz the power
Retried try job too often on linux_rel for step(s) interactive_ui_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=212074
6 years, 11 months ago (2014-01-09 15:53:46 UTC) #20
Yuki
I found that some of unittests don't expect that FontList::SetDefaultFontDescription() creates a new Font. Also ...
6 years, 11 months ago (2014-01-09 18:02:12 UTC) #21
Alexei Svitkine (slow)
On 2014/01/09 18:02:12, Yuki wrote: > I found that some of unittests don't expect that ...
6 years, 11 months ago (2014-01-09 20:58:12 UTC) #22
Yuki
I found the following two cases that matter. There could be more. On Linux GTK, ...
6 years, 11 months ago (2014-01-10 04:57:09 UTC) #23
msw
https://codereview.chromium.org/124693003/diff/1590001/ui/gfx/font_list.cc File ui/gfx/font_list.cc (right): https://codereview.chromium.org/124693003/diff/1590001/ui/gfx/font_list.cc#newcode101 ui/gfx/font_list.cc:101: // Note that not all the platforms support PlatformFont. ...
6 years, 11 months ago (2014-01-10 17:54:50 UTC) #24
Yuki
https://codereview.chromium.org/124693003/diff/1590001/ui/gfx/font_list.cc File ui/gfx/font_list.cc (right): https://codereview.chromium.org/124693003/diff/1590001/ui/gfx/font_list.cc#newcode101 ui/gfx/font_list.cc:101: // Note that not all the platforms support PlatformFont. ...
6 years, 11 months ago (2014-01-11 09:29:06 UTC) #25
msw
On 2014/01/11 09:29:06, Yuki wrote: > https://codereview.chromium.org/124693003/diff/1590001/ui/gfx/font_list.cc > File ui/gfx/font_list.cc (right): > > https://codereview.chromium.org/124693003/diff/1590001/ui/gfx/font_list.cc#newcode101 > ...
6 years, 11 months ago (2014-01-11 18:50:59 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/yukishiino@chromium.org/124693003/1590001
6 years, 11 months ago (2014-01-12 13:06:53 UTC) #27
commit-bot: I haz the power
6 years, 11 months ago (2014-01-12 18:21:33 UTC) #28
Message was sent while issue was closed.
Change committed as 244446

Powered by Google App Engine
This is Rietveld 408576698