New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 603314 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2016
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Implement font fallback cache

Project Member Reported by kulshin@chromium.org, Apr 13 2016

Issue description

Skia/blink currently calls the font fallback code at least once per text block. This is certainly better than once per character, but still too much to be doing IPC on every call.

We should add logic to the font fallback implementation to keep track of which font families were recently retrieved - if they can match the desired character we don't need to do the IPC at all.

There's a few possible ways to organize the cache:
A single list of fonts - non-specific, but probably good enough if fallback is rare.
A list of fonts per locale - more specific than a single list, but potential poor cache performance if the character doesn't match the locale.
Mapping from character to font - most specific, but likely very poor cache hit rate.
A list of fonts per base font - better matching of font styles (esp serif vs sans-serif); more IPC. Perhaps best combined with one of the other options?

 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 22 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d1b7cb69dada3cdb1aafb237429fac639041e10e

commit d1b7cb69dada3cdb1aafb237429fac639041e10e
Author: kulshin <kulshin@chromium.org>
Date: Fri Apr 22 17:04:26 2016

Implement fallback cache

Adds logic to font fallback to track recently used fallback fonts, so
that we can avoid doing an IPC when rendering a page with many text
blocks that all use the same fallback font.
Also adds metrics to track the effectiveness of font fallback.

BUG= 603314 

Review URL: https://codereview.chromium.org/1906633003

Cr-Commit-Position: refs/heads/master@{#389145}

[modify] https://crrev.com/d1b7cb69dada3cdb1aafb237429fac639041e10e/content/child/dwrite_font_proxy/font_fallback_win.cc
[modify] https://crrev.com/d1b7cb69dada3cdb1aafb237429fac639041e10e/content/child/dwrite_font_proxy/font_fallback_win.h
[modify] https://crrev.com/d1b7cb69dada3cdb1aafb237429fac639041e10e/content/child/dwrite_font_proxy/font_fallback_win_unittest.cc
[modify] https://crrev.com/d1b7cb69dada3cdb1aafb237429fac639041e10e/tools/metrics/histograms/histograms.xml

Status: Fixed (was: Assigned)

Sign in to add a comment