Closed Bug 1421041 Opened 8 years ago Closed 8 years ago

WebRender on OS X forces LCD antialiasing even when disabled in system settings

Categories

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

x86_64
macOS
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox-esr52 --- unaffected
firefox57 --- unaffected
firefox58 --- unaffected
firefox59 --- unaffected

People

(Reporter: alankila, Assigned: lsalzman)

References

Details

(Keywords: nightly-community, Whiteboard: [wr-reserve])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.59 Safari/537.36 Steps to reproduce: 1. I installed nightly (2017-11-27) on OS X. 2. I turned on webrender settings: gfx.webrender.blob-images and gfx.webrender.enabled 3. I started browsing random sites, e.g. reddit, LWN, and so on. Actual results: I immediately observed that subpixel antialiasing was turned on. However, I have told OS X to not enable LCD rendering even if it's available, under the system's general settings. Applications typically respect this choice, and only show grayscale antialiased text. The underlying reason for why I do this is that turning off LCD rendering seems to make glyphs much thinner. As I understand it, OS X uses some kind of outline fattening in LCD modes. Whatever the justification for distorting the glyph shapes like that, I think it is misguided and looks ugly. With today's high DPI screens, we don't even get much of a benefit from the increased horizontal resolution over just doing grayscale. Expected results: Firefox should respect system settings and only use grayscale antialiasing when user has expressed such preference.
Component: Untriaged → Graphics: WebRender
Product: Firefox → Core
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
Whiteboard: [wr-mvp] [triage]
Version: unspecified → Trunk
Whiteboard: [wr-mvp] [triage] → [wr-reserve]
Does this happen when WebRender is disabled?
Flags: needinfo?(alankila)
No, Firefox switches to grayscale antialiasing.
Flags: needinfo?(alankila)
(In reply to Antti Lankila from comment #2) > No, Firefox switches to grayscale antialiasing. Are you actually getting LCD anti-aliasing in WebRender? Even though the text may be thicker, it might still be grayscale. Can you take screenshots with both WebRender on and off and attach them here?
Flags: needinfo?(alankila)
The only difference between these two firefox renderings is the about:config change in gfx.webrender.enabled.
Flags: needinfo?(alankila)
Status: UNCONFIRMED → NEW
Ever confirmed: true
Er, I mean: webrender additionally calls set_allows_font_smoothing.
Tangentially, if you analyze the webrendered screenshot that I provided, you can see an additional reason why I keep LCD smoothing off in Macintosh computers. E.g. Look at the vertical stem of the D character in the SPDX word. See that this stem's left edge is red/yellow and its right edge is light blue, and there are multiple completely black pixels between these colored edges, and the pixels outside of those mentioned are 100% white. This will appear color fringed because the red and blue are too far apart to appear gray in human eye. All locally correct LCD filtering technology must generate reddish and a corresponding bluish pixel at neighboring pixels if the result is to appear gray, no matter the thickness of the outline. This is usually achieved by applying a 3 subpixel wide averaging filter on the alpha coverage bitmap. Evidently OS X hasn't figured out that it needs to do this. I suspect those fat glyphs are someone's hack to hide the problem.
(In reply to Markus Stange [:mstange] from comment #7) > Er, I mean: webrender additionally calls set_allows_font_smoothing. Looks like we probably do not want use set_allows_font_smoothing nor set_allows_antialiasing? I guess this is how the OS is getting involved here. Docs state that these are not part of the graphics state, whereas the should_ versions are the ones it says we should be using.
Depends on: 1422317
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Priority: P3 → P1
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: