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

Issue 1962263002: Introduce FontCache content scaling (Closed)

Created:
4 years, 7 months ago by tzik
Modified:
4 years, 7 months ago
CC:
blink-reviews, blink-reviews-platform-graphics_chromium.org, Rik, chromium-reviews, danakj+watch_chromium.org, dshwang, drott+blinkwatch_chromium.org, krit, f(malita), jbroman, Justin Novosad, kinuko, kinuko+watch, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Introduce FontCache content scaling FontPlatformData stored in FontCache has size-independent backing font data on non-Mac platform, and can be safely reused for different font sizes by scaling. This CL modifies FontCache to reuse a FontPlatformData to different size of font, so that Blink's layout phase requires smaller number of expensive synchronous IPCs. This reduces the first layout time of text-heavy CJK sites on Linux. E.g. reduces layout time of http://b.hatena.ne. jp/ from 740ms to 515ms, and https://ja-jp.facebook.com/legal/terms from 453ms to 428ms. BUG=608650 Committed: https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af Cr-Commit-Position: refs/heads/master@{#395022}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 7

Patch Set 6 : +comment #

Patch Set 7 : #

Total comments: 1

Patch Set 8 : fix #

Total comments: 2

Patch Set 9 : use UnsignedWithZeroKeyHashTraits #

Patch Set 10 : +Finch setup #

Patch Set 11 : rebase #

Patch Set 12 : win layout test fix #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+78 lines, -12 lines) Patch
M chrome/app/generated_resources.grd View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/about_flags.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +4 lines, -0 lines 0 comments Download
M content/child/runtime_features.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -1 line 0 comments Download
M content/public/common/content_features.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/public/common/content_features.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/platform/RuntimeEnabledFeatures.in View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontCache.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 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 4 chunks +49 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontCacheKey.h View 1 2 3 4 1 chunk +5 lines, -0 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 56 (24 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1962263002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1962263002/1
4 years, 7 months ago (2016-05-10 09:24:33 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/224881)
4 years, 7 months ago (2016-05-10 11:05:11 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1962263002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1962263002/20001
4 years, 7 months ago (2016-05-10 13:41:15 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/224963)
4 years, 7 months ago (2016-05-10 14:36:14 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1962263002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1962263002/40001
4 years, 7 months ago (2016-05-10 14:42:49 UTC) #11
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/67767)
4 years, 7 months ago (2016-05-10 16:01:43 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/1962263002/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1962263002/60001
4 years, 7 months ago (2016-05-17 08:01:16 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/222929)
4 years, 7 months ago (2016-05-17 09:51:55 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/1962263002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1962263002/80001
4 years, 7 months ago (2016-05-17 13:02:21 UTC) #19
tzik
PTAL
4 years, 7 months ago (2016-05-17 13:55:09 UTC) #22
eae
https://codereview.chromium.org/1962263002/diff/80001/third_party/WebKit/Source/platform/fonts/FontCache.cpp File third_party/WebKit/Source/platform/fonts/FontCache.cpp (right): https://codereview.chromium.org/1962263002/diff/80001/third_party/WebKit/Source/platform/fonts/FontCache.cpp#newcode70 third_party/WebKit/Source/platform/fonts/FontCache.cpp:70: typedef HashMap<unsigned, OwnPtr<FontPlatformData>> SizedFontPlatformDataSet; Long term we should probably ...
4 years, 7 months ago (2016-05-17 14:42:55 UTC) #24
tzik
https://codereview.chromium.org/1962263002/diff/80001/third_party/WebKit/Source/platform/fonts/FontCache.cpp File third_party/WebKit/Source/platform/fonts/FontCache.cpp (right): https://codereview.chromium.org/1962263002/diff/80001/third_party/WebKit/Source/platform/fonts/FontCache.cpp#newcode116 third_party/WebKit/Source/platform/fonts/FontCache.cpp:116: auto addResult = sizedFonts->add(size ? size * FontCacheKey::precisionMultiplier() : ...
4 years, 7 months ago (2016-05-17 14:56:19 UTC) #25
eae
On 2016/05/17 14:56:19, tzik wrote: > https://codereview.chromium.org/1962263002/diff/80001/third_party/WebKit/Source/platform/fonts/FontCache.cpp > File third_party/WebKit/Source/platform/fonts/FontCache.cpp (right): > > https://codereview.chromium.org/1962263002/diff/80001/third_party/WebKit/Source/platform/fonts/FontCache.cpp#newcode116 > ...
4 years, 7 months ago (2016-05-17 15:07:02 UTC) #26
eae
4 years, 7 months ago (2016-05-17 15:07:08 UTC) #27
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1962263002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1962263002/120001
4 years, 7 months ago (2016-05-17 15:54:44 UTC) #29
tzik
On 2016/05/17 15:07:02, eae wrote: > On 2016/05/17 14:56:19, tzik wrote: > > > https://codereview.chromium.org/1962263002/diff/80001/third_party/WebKit/Source/platform/fonts/FontCache.cpp ...
4 years, 7 months ago (2016-05-17 16:02:46 UTC) #30
eae
LGTM
4 years, 7 months ago (2016-05-17 16:27:43 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_gn_rel on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_gn_rel/builds/112540)
4 years, 7 months ago (2016-05-17 16:49:58 UTC) #33
kouhei (in TOK)
Please measure the impact of CL under finch so that you receive credit :) e.g.) ...
4 years, 7 months ago (2016-05-18 02:31:06 UTC) #35
drott
tzik, thanks for the CL! Glad to see we're making progress on this. I don't ...
4 years, 7 months ago (2016-05-18 07:22:48 UTC) #36
drott
PS: (I mean this along the lines of eae@'s earlier statement: "Long term we should ...
4 years, 7 months ago (2016-05-18 07:26:20 UTC) #37
tzik
https://codereview.chromium.org/1962263002/diff/140001/third_party/WebKit/Source/platform/fonts/FontCache.cpp File third_party/WebKit/Source/platform/fonts/FontCache.cpp (right): https://codereview.chromium.org/1962263002/diff/140001/third_party/WebKit/Source/platform/fonts/FontCache.cpp#newcode71 third_party/WebKit/Source/platform/fonts/FontCache.cpp:71: typedef HashMap<FontCacheKey, SizedFontPlatformDataSet, FontCacheKeyHash, FontCacheKeyTraits> FontPlatformDataCache; On 2016/05/18 07:22:48, ...
4 years, 7 months ago (2016-05-18 07:26:53 UTC) #38
drott
On 2016/05/18 at 07:26:53, tzik wrote: > https://codereview.chromium.org/1962263002/diff/140001/third_party/WebKit/Source/platform/fonts/FontCache.cpp > File third_party/WebKit/Source/platform/fonts/FontCache.cpp (right): > > https://codereview.chromium.org/1962263002/diff/140001/third_party/WebKit/Source/platform/fonts/FontCache.cpp#newcode71 ...
4 years, 7 months ago (2016-05-18 07:30:48 UTC) #39
drott
Do you know what the reason is for the mac bot failures atm?
4 years, 7 months ago (2016-05-18 07:31:36 UTC) #40
tzik
On 2016/05/18 07:31:36, drott wrote: > Do you know what the reason is for the ...
4 years, 7 months ago (2016-05-18 09:06:48 UTC) #41
tzik
Now all test should get green. kinuko: Could you review //chrome and //content part for ...
4 years, 7 months ago (2016-05-19 13:56:05 UTC) #46
kinuko
cool. finch-flag related change lgtm https://codereview.chromium.org/1962263002/diff/260001/content/public/common/content_features.cc File content/public/common/content_features.cc (right): https://codereview.chromium.org/1962263002/diff/260001/content/public/common/content_features.cc#newcode39 content/public/common/content_features.cc:39: // size of font. ...
4 years, 7 months ago (2016-05-19 14:36:02 UTC) #47
Ilya Sherman
histograms.xml lgtm
4 years, 7 months ago (2016-05-19 22:32:08 UTC) #48
kouhei (in TOK)
lgtm
4 years, 7 months ago (2016-05-20 06:57:35 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1962263002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1962263002/260001
4 years, 7 months ago (2016-05-20 06:58:45 UTC) #52
commit-bot: I haz the power
Committed patchset #12 (id:260001)
4 years, 7 months ago (2016-05-20 07:02:55 UTC) #54
commit-bot: I haz the power
4 years, 7 months ago (2016-05-20 07:04:30 UTC) #56
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/d9ea08ed34d022152362130ae95f55fbd814a3af
Cr-Commit-Position: refs/heads/master@{#395022}

Powered by Google App Engine
This is Rietveld 408576698