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)
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.
Updated•8 years ago
|
Component: Untriaged → Graphics: WebRender
Product: Firefox → Core
Updated•8 years ago
|
status-firefox57:
--- → unaffected
status-firefox58:
--- → unaffected
status-firefox59:
--- → unaffected
status-firefox-esr52:
--- → unaffected
Keywords: nightly-community
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86_64
Whiteboard: [wr-mvp] [triage]
Version: unspecified → Trunk
Updated•8 years ago
|
Blocks: stage-wr-trains
Priority: -- → P3
Updated•8 years ago
|
Whiteboard: [wr-mvp] [triage] → [wr-reserve]
| Assignee | ||
Comment 1•8 years ago
|
||
Does this happen when WebRender is disabled?
Flags: needinfo?(alankila)
| Reporter | ||
Comment 2•8 years ago
|
||
No, Firefox switches to grayscale antialiasing.
Flags: needinfo?(alankila)
| Assignee | ||
Comment 3•8 years ago
|
||
(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)
| Reporter | ||
Comment 4•8 years ago
|
||
| Reporter | ||
Comment 5•8 years ago
|
||
The only difference between these two firefox renderings is the about:config change in gfx.webrender.enabled.
Flags: needinfo?(alankila)
Comment 6•8 years ago
|
||
It looks like the Skia code only calls CGContextSetShouldSmoothFonts, but the webrender code additionally calls set_should_smooth_fonts.
https://searchfox.org/mozilla-central/rev/be78e6ea9b10b1f5b2b3b013f01d86e1062abb2b/gfx/skia/skia/src/ports/SkFontHost_mac.cpp#923
https://searchfox.org/mozilla-central/rev/be78e6ea9b10b1f5b2b3b013f01d86e1062abb2b/gfx/webrender/src/platform/macos/font.rs#570
Updated•8 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 7•8 years ago
|
||
Er, I mean: webrender additionally calls set_allows_font_smoothing.
| Reporter | ||
Comment 8•8 years ago
|
||
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.
| Assignee | ||
Comment 9•8 years ago
|
||
(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.
| Assignee | ||
Comment 10•8 years ago
|
||
Added WR PR https://github.com/servo/webrender/pull/2152 to address this.
See Also: → https://github.com/servo/webrender/pull/2152
| Assignee | ||
Updated•8 years ago
|
Assignee: nobody → lsalzman
Status: NEW → ASSIGNED
Priority: P3 → P1
| Assignee | ||
Updated•8 years ago
|
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.
Description
•