Closed Bug 1414157 Opened 3 years ago Closed 3 years ago

Pass the font smoothing background color to WebRender

Categories

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

All
macOS
enhancement

Tracking

()

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- unaffected
firefox58 --- unaffected

People

(Reporter: mstange, Assigned: mstange)

References

(Blocks 1 open bug)

Details

(Whiteboard: [wr-reserve])

Attachments

(1 file)

This will make text on top of light vibrancy have correct subpixel AA.

At the moment we don't have such text. But for example bug 1413271 would create some.

The necessary WebRender API was added in https://github.com/servo/webrender/pull/1974 .
Having the font smoothing background color on the ScaledFontMac, i.e. bug 1414154, is a prerequisite for this.
Comment on attachment 8924845 [details]
Bug 1414157 - Supply the font smoothing background color in the webrender FontInstanceOptions.

https://reviewboard.mozilla.org/r/196102/#review201278

You need to zero this out in the DWrite and Fontconfig GetWRFontInstanceOptions functions that also set FontInstanceOptions.
Priority: -- → P1
Whiteboard: [wr-reserve]
(In reply to Lee Salzman [:lsalzman] from comment #2)
> You need to zero this out in the DWrite and Fontconfig
> GetWRFontInstanceOptions functions that also set FontInstanceOptions.

I'm taking care of that in bug 1413178. But I had forgotten the DWrite backend (probably because it didn't show up in the top section in the searchfox results), so thanks for pointing that out. I've commented on bug 1413178.
Comment on attachment 8924845 [details]
Bug 1414157 - Supply the font smoothing background color in the webrender FontInstanceOptions.

https://reviewboard.mozilla.org/r/196102/#review201462
Attachment #8924845 - Flags: review?(lsalzman) → review+
(In reply to Markus Stange [:mstange] from comment #0)
> This will make text on top of light vibrancy have correct subpixel AA.
> 
> At the moment we don't have such text.

That's actually not true - if you open the sidebar and then select "Synced Tabs", there is some text that asks you to sign in to sync or to download other browsers. This text looks really bad in webrender without the fix, and looks great with the fix. It does seem ever so slightly thicker than with webrender off, though, but I'm not going to worry about that.
Pushed by mstange@themasta.com:
https://hg.mozilla.org/integration/autoland/rev/a80606dac393
Supply the font smoothing background color in the webrender FontInstanceOptions. r=lsalzman
https://hg.mozilla.org/mozilla-central/rev/a80606dac393
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
You need to log in before you can comment on or make changes to this bug.