Closed
Bug 1681346
Opened 3 years ago
Closed 2 years ago
Deduplicate system fonts in WebRender
Categories
(Core :: Graphics: WebRender, enhancement, P3)
Core
Graphics: WebRender
Tracking
()
RESOLVED
DUPLICATE
of bug 1758555
People
(Reporter: nical, Unassigned)
References
Details
I suspect that we create them once per process that use them.
Instead of creating/deleting them when we get ResourceUpdate::AddFont/DeleteFont, we should keep add a cahce of existing system fonts by name with a reference count. When requesting glyphs we should use the deduplicated handle to avoid extra rasterization.
Comment 1•3 years ago
|
||
This will become more important with Fission as we'll have lots of processes.
Comment 2•2 years ago
•
|
||
The reality is actually worse: We don't only create them once per content process, we even create them once per tab, even for tabs that share the same process. For example in bug 1683975, we run into performance problems because creating new system font objects in WR for every new tab is quite slow.
Comment 3•2 years ago
|
||
I could imagine this working as follows:
- Change things so that we don't key the glyph cache on the font-key and instead use some per font key. This can essentially be what ever the font key maps to.
- Keep a cache that maps (serialized system font, font)
Updated•2 years ago
|
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•