Closed Bug 1393055 Opened 2 years ago Closed 2 years ago

Map ScaledFonts to WebRender FontInstanceKeys


(Core :: Graphics: WebRender, enhancement, P3)

56 Branch



Tracking Status
firefox57 --- fixed


(Reporter: lsalzman, Assigned: lsalzman)



(Keywords: feature, Whiteboard: [gfx-noted])


(1 file, 1 obsolete file)

This is part of an effort to clean up how we route ScaledFonts into WebRender. It enables us to associate various options with a FontInstanceKey, which we can thereafter just use via the FontInstanceKey rather than always having to pass them via push_text.

FontInstanceKeys map 1:1 with ScaledFonts. Previous work ensured the ScaledFonts as well have a stable 1:1 mapping with gfxFontEntry so that this is safe and performant.

This is just the Gecko-side half of these changes. Most of this is just plumbing done that is analogous to how UnscaledFonts were plumbed.

The rest is work in WebRender itself, which is being dealt with in a PR there.

Future work will expand upon how FontInstancePlatformOptions works (a parameter to add_font_instance), allowing for more platform dependent mapping of ScaledFonts to FontInstanceKeys.
Attachment #8900285 - Flags: review?(jmuizelaar)
The WebRender changes are currently queued in this PR:
Blocks: 1391614
Attachment #8900285 - Flags: review?(jmuizelaar) → review+
Just rebasing this against recent Gecko. No changes otherwise.
Attachment #8900285 - Attachment is obsolete: true
Attachment #8902791 - Flags: review+
Pushed by
map ScaledFonts to WebRender FontInstanceKeys. r=jrmuizel
Btw, thanks for keeping this patch rebased! Made it real easy to land with the WR update :)
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.