Map ScaledFonts to WebRender FontInstanceKeys

RESOLVED FIXED in Firefox 57

Status

()

Core
Graphics: WebRender
P3
normal
RESOLVED FIXED
11 months ago
11 months ago

People

(Reporter: lsalzman, Assigned: lsalzman)

Tracking

({feature})

56 Branch
mozilla57
feature
Points:
---

Firefox Tracking Flags

(firefox57 fixed)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

11 months ago
Created attachment 8900285 [details] [diff] [review]
map ScaledFonts to WebRender FontInstanceKeys

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)
(Assignee)

Comment 1

11 months ago
The WebRender changes are currently queued in this PR: https://github.com/servo/webrender/pull/1602
(Assignee)

Updated

11 months ago
Blocks: 1391614
No longer blocks: 1391614
Attachment #8900285 - Flags: review?(jmuizelaar) → review+
No longer blocks: 1393468
No longer blocks: 1394394
(Assignee)

Comment 2

11 months ago
Created attachment 8902791 [details] [diff] [review]
map ScaledFonts to WebRender FontInstanceKeys

Just rebasing this against recent Gecko. No changes otherwise.
Attachment #8900285 - Attachment is obsolete: true
Attachment #8902791 - Flags: review+

Comment 3

11 months ago
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
Last Resolved: 11 months ago
status-firefox57: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla57
You need to log in before you can comment on or make changes to this bug.