mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
`FontContext::get_layout_font_group_for_style()`. There are several optimizations here: * We make font families atoms, to allow for quicker comparisons. * We precalculate an FNV hash of the relevant fields of the font style structure. * When obtaining a platform font group, we first check pointer equality for the font style. If there's no match, we go to the FNV hash. Only if both caches miss do we construct and cache a font group. Note that individual fonts are *also* cached; thus there are two layers of caching here. 15% improvement in total layout thread time for Facebook Timeline. |
||
---|---|---|
.. | ||
canvas | ||
compositing | ||
devtools | ||
devtools_traits | ||
gfx | ||
layout | ||
layout_traits | ||
msg | ||
net | ||
plugins | ||
profile | ||
script | ||
script_traits | ||
servo | ||
style | ||
util |