Closed Bug 1645621 Opened 5 years ago Closed 5 years ago

macOS text rendering worse with WebRender

Categories

(Core :: Graphics: WebRender, defect)

79 Branch
x86_64
macOS
defect

Tracking

()

VERIFIED FIXED
mozilla79
Tracking Status
firefox79 --- fixed

People

(Reporter: sam, Assigned: lsalzman)

References

(Blocks 1 open bug)

Details

Attachments

(5 files, 1 obsolete file)

Attached image comparison.png

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:79.0) Gecko/20100101 Firefox/79.0

Steps to reproduce:

  1. Enable gfx.webrender.all preference
  2. Restart Firefox
  3. Observe noticeably worse text rendering

Actual results:

There appears to be a "grey fringe" around text when WebRender is enabled on macOS. This is primarily noticeable when a non-greyscale text color is used. This causes text to look much different than it does without WebRender, and when compared to other browsers.

Expected results:

Text with a non-greyscale color in WR should look as it does throughout the OS, other browsers, and when WR is disabled.

Here is the page used in the screenshot.

Attached file about:support

Here is my about:support. Note that while I do also have gfx.webrender.compositor enabled, the result is the same regardless of this value.

Component: Untriaged → Graphics: WebRender
OS: Unspecified → macOS
Product: Firefox → Core
Hardware: Unspecified → x86_64

A few additional pieces of information:

  • Example is from macOS 10.13.6
  • macOS "LCD font smoothing" preference is disabled
  • A non-retina display was used (it's probably harder to notice on a retina display)
  • WR and non-WR screenshots are from the same profile

Hi Sam, thank you for the detailed bug report!

Do you know whether this has always been the case with webrender enabled, or whether it is a recent regression?

Blocks: wr-mac
Severity: -- → S3
Flags: needinfo?(lsalzman)

Not a recent regression, it's been the case as long as I can remember.

Depending on whether font smoothing is requested, we apply post-processing to
the rasterized glyph which can include undoing the gamma, which varies between
smoothed and grayscale AA. If we accidentally do this when no font smoothing
is applied, this can result in significantly distorted glyphs. Skia currently
checks if font smoothing works, so seems to gracefully handle this case, while
WebRender does no such check and so doesn't do the right thing here. This adds
a check higher up in the platform font list so that we handle this properly
regardless of which backend is used.

Assignee: nobody → lsalzman
Flags: needinfo?(lsalzman)
Attachment #9158776 - Attachment is obsolete: true
Attachment #9159082 - Attachment description: Bug 1645621 - gracefully downgrade to grayscale and/or font smoothing in WR when necessary. r?jrmuizel → Bug 1645621 - gracefully downgrade to grayscale font smoothing in WR when necessary. r?jrmuizel
Pushed by lsalzman@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/b0c8be07903f gracefully downgrade to grayscale font smoothing in WR when necessary. r=jrmuizel
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla79
Flags: qe-verify+

Hello,

I have tried to reproduce this issue on 2 different MacBook Pro models. (a mid 2015 15" retina display, and a mid 2012 13" non retina display) and did not manage to encounter it on affected build from 2020-06-13.

Can you please try to verify this on the latest beta and see if the issue is fixed?
Thank you

Flags: qe-verify+ → needinfo?(sam)

(In reply to Vlad Lucaci, QA (:vlucaci) from comment #10)

Hello,

I have tried to reproduce this issue on 2 different MacBook Pro models. (a mid 2015 15" retina display, and a mid 2012 13" non retina display) and did not manage to encounter it on affected build from 2020-06-13.

Can you please try to verify this on the latest beta and see if the issue is fixed?
Thank you

What version of macOS were you running?

Flags: needinfo?(vlad.lucaci)

This is significantly improved after the patch. Thanks lsalzman! I have verified the following configurations now all have the correct rendering:

  • macOS 10.13.6 with "LCD font smoothing" on
  • macOS 10.13.6 with "LCD font smoothing" off
  • macOS 10.15.5 with "font smoothing" on
  • macOS 10.15.5 with "font smoothing" off
Status: RESOLVED → VERIFIED
Flags: needinfo?(sam)

In both instances , I was using 10.15.5.

Flags: needinfo?(vlad.lucaci) → needinfo?(jmuizelaar)

(In reply to Vlad Lucaci, QA (:vlucaci) from comment #13)

In both instances , I was using 10.15.5.

That's weird. Can you post a screenshot from the affected version.

Flags: needinfo?(jmuizelaar) → needinfo?(vlad.lucaci)
Attached image Lorem ipsum example.png

Hi Jeff, here's an attachment from the affected version (2020-06-13), with webrender enabled and font smoothing off (macbook retina, 10.15.6) in comparison with the same page in chrome.

Flags: needinfo?(vlad.lucaci)

(In reply to Catalin Sasca, QA [:csasca] from comment #15)

Created attachment 9164341 [details]
Lorem ipsum example.png

Hi Jeff, here's an attachment from the affected version (2020-06-13), with webrender enabled and font smoothing off (macbook retina, 10.15.6) in comparison with the same page in chrome.

Ok, yeah. That screenshot shows the problem. Notice the gray fringing around the letters compared to Chrome.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: