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

Issue 1931393002: Introduce typeface cache in blink::FontCache (Closed)

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

Description

Introduce typeface cache in blink::FontCache blink::FontCache stores fonts as FontPlatformData, that is associated with the font size. However on other platform than Mac, the backing SkTypeface are independent of the size and can be shared among font queries that have different sizes. This CL adds a cache to hold SkTypeface on non-Mac platform. TODO: * Measure the performance on Windows. * Set up finch experiment to measure it in wild. For more context, see https://codereview.chromium.org/1919183002/ BUG=

Patch Set 1 #

Patch Set 2 : rebase #

Patch Set 3 : wip: Refine FontDataCache storage. Add m_fontSize to SimpleFontData. #

Patch Set 4 : wip: remove FontPlatformData::size() #

Patch Set 5 : wip: Remove fontSize from FontPlatformData ctor #

Patch Set 6 : wip: others #

Unified diffs Side-by-side diffs Delta from patch set Stats (+236 lines, -234 lines) Patch
M third_party/WebKit/Source/core/css/BinaryDataFontFaceSource.cpp View 1 2 3 4 1 chunk +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/css/RemoteFontFaceSource.cpp View 1 2 3 4 2 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FontResource.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/FontResource.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/blink_platform.gypi View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/Font.cpp View 1 2 3 4 5 4 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontCache.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontCache.cpp View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.h View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontCustomPlatformData.cpp View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontDataCache.h View 1 2 3 4 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontDataCache.cpp View 1 2 3 chunks +29 lines, -27 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontPlatformData.h View 1 2 3 4 5 3 chunks +4 lines, -17 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontPlatformData.cpp View 1 2 3 4 5 11 chunks +5 lines, -46 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontPlatformDataTest.cpp View 1 2 3 4 5 3 chunks +3 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/FontRenderStyle.h View 1 2 3 4 5 2 chunks +18 lines, -1 line 0 comments Download
A third_party/WebKit/Source/platform/fonts/FontRenderStyle.cpp View 1 2 3 4 5 1 chunk +106 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/SimpleFontData.h View 1 2 3 4 5 4 chunks +10 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/SimpleFontData.cpp View 1 2 3 4 5 10 chunks +17 lines, -10 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/linux/FontPlatformDataLinux.cpp View 1 2 3 4 5 1 chunk +1 line, -90 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.h View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzFace.cpp View 1 2 3 4 5 1 chunk +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/fonts/shaping/HarfBuzzShaper.cpp View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/platform/fonts/skia/FontCacheSkia.cpp View 1 2 3 4 2 chunks +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/platform/testing/FontTestHelpers.cpp View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/Source/web/linux/WebFontRendering.cpp View 1 2 3 4 5 1 chunk +5 lines, -5 lines 0 comments Download

Messages

Total messages: 23 (11 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/1931393002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1931393002/1
4 years, 7 months ago (2016-04-29 16:46:45 UTC) #2
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios_dbg_simulator_gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios_dbg_simulator_gn/builds/27398) ios_dbg_simulator_ninja on ...
4 years, 7 months ago (2016-04-29 16:48:51 UTC) #4
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1931393002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1931393002/20001
4 years, 7 months ago (2016-04-29 17:01:15 UTC) #6
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 7 months ago (2016-04-29 18:24:46 UTC) #10
eae
This is great, thanks for working on this. One thought though, what if instead we ...
4 years, 7 months ago (2016-04-30 01:03:12 UTC) #14
tzik
On 2016/04/30 01:03:12, eae wrote: > This is great, thanks for working on this. > ...
4 years, 7 months ago (2016-04-30 12:08:33 UTC) #15
eae
On 2016/04/30 12:08:33, tzik wrote: > On 2016/04/30 01:03:12, eae wrote: > > This is ...
4 years, 7 months ago (2016-05-01 00:11:38 UTC) #16
tzik
On 2016/05/01 00:11:38, eae wrote: > On 2016/04/30 12:08:33, tzik wrote: > > On 2016/04/30 ...
4 years, 7 months ago (2016-05-03 08:58:15 UTC) #17
kojii
It looks like WebKit is trying a similar attempt, though their intention isn't clear from ...
4 years, 7 months ago (2016-05-04 15:52:36 UTC) #18
tzik
On 2016/05/04 15:52:36, kojii wrote: > It looks like WebKit is trying a similar attempt, ...
4 years, 7 months ago (2016-05-06 01:43:15 UTC) #19
tzik
On 2016/05/06 01:43:15, tzik wrote: > On 2016/05/04 15:52:36, kojii wrote: > > It looks ...
4 years, 7 months ago (2016-05-10 03:58:57 UTC) #21
eae
4 years, 7 months ago (2016-05-10 18:37:35 UTC) #22
On 2016/05/10 03:58:57, tzik wrote:
> On 2016/05/06 01:43:15, tzik wrote:
> > On 2016/05/04 15:52:36, kojii wrote:
> > > It looks like WebKit is trying a similar attempt, though their intention
> isn't
> > > clear from the bug.
> > > https://bugs.webkit.org/show_bug.cgi?id=157061
> > 
> > Interesting. Yes, it's similar to mine.
> > I thought we can not move the font size out from FontPlatformData on Mac,
but
> > they actually did it.
> 
> Hmm, it looks hard or even impossible to me to remove the size on Mac. Let me
> leave the size as is on Mac.

Ok, we could do that as an interim step. Is Patch 6 ready for review or do you
have other changes you want to make first?

Powered by Google App Engine
This is Rietveld 408576698