Open
Bug 1507975
Opened 6 years ago
Updated 2 years ago
Bake spacing information into gfxShapedText
Categories
(Core :: Graphics: Text, enhancement, P3)
Core
Graphics: Text
Tracking
()
NEW
People
(Reporter: jrmuizel, Unassigned)
References
(Blocks 3 open bugs)
Details
As I understand it we currently build the spacing information for a text run everytime we draw it by calling gfxTextRun::GetAdjustedSpacingArray. Instead of this it seems like we should be able to adjust for the spacing while we're doing shaping. This is the approach that Chrome takes.
Doing this will saves time gathering the spacing information as well as adjusting the advances during paint. It also move gfxTextRun more towards being immutable which will be useful for when we want to cache the glyph areas with WebRender.
Reporter | ||
Updated•6 years ago
|
Blocks: text-caching
Reporter | ||
Comment 1•6 years ago
|
||
Jonathan, can you think of reasons we wouldn't want to do this?
Flags: needinfo?(jfkthame)
Reporter | ||
Comment 2•6 years ago
|
||
It seems like this could also speed up MeasureCharClippedText which accounts 6.7% of webrender text painting time.
Comment 3•6 years ago
|
||
I'm not sure "while we're doing shaping" would be the right time to adjust for spacing, as we have to consider spacing generated by justification or tab-stops, which isn't known until after we've shaped text and constructed textruns (in order to measure the "unspaced" text and figure out what spacing to add).
But I can imagine that caching the computed spacing somehow might be worthwhile, or "applying" it to the shaped textrun (if we can be sure that the textrun will be refreshed if something changes that would affect the spacing we computed). Doing all the work of GetAdjustedSpacingArray every time we draw does seem excessive.
Flags: needinfo?(jfkthame)
Reporter | ||
Updated•6 years ago
|
Priority: -- → P3
Updated•2 years ago
|
Blocks: wr-displaylist-perf
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•