Closed Bug 1393055 Opened 2 years ago Closed 2 years ago

Map ScaledFonts to WebRender FontInstanceKeys

Categories

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

56 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla57
Tracking Status
firefox57 --- fixed

People

(Reporter: lsalzman, Assigned: lsalzman)

References

Details

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

Attachments

(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: https://github.com/servo/webrender/pull/1602
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 kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/a47911a010ff
map ScaledFonts to WebRender FontInstanceKeys. r=jrmuizel
Btw, thanks for keeping this patch rebased! Made it real easy to land with the WR update :)
https://hg.mozilla.org/mozilla-central/rev/a47911a010ff
Status: ASSIGNED → RESOLVED
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.