Open Bug 1724057 Opened 1 year ago Updated 8 days ago

No subpixel anti-aliasing in tab bar, address bar, sidebar, bookmark bar with WebRender

Categories

(Core :: Graphics: WebRender, defect)

Firefox 90
defect

Tracking

()

Tracking Status
firefox-esr91 --- fix-optional
firefox94 --- wontfix
firefox95 --- fix-optional
firefox96 --- affected

People

(Reporter: iam, Assigned: gw)

References

(Blocks 4 open bugs)

Details

Attachments

(5 files)

User Agent: Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:90.0) Gecko/20100101 Firefox/90.0

Steps to reproduce:

Firefox 90.0.2 on Fedora Linux 34 does not have subpixel anti-aliasing in tab bar, address bar, sidebar, bookmark bar with default settings.
The website content has anti-aliasing.

Actual results:

This bug seems to be in WebRender. If I disable WebRender (gfx.webrender.force-disabled=true) and restart the browser, sidebar, tab bar and address bar will have subpixel AA again.

Expected results:

All elements should have subpixel AA with WebRender, just as it is without.

This is a screenshot with a fresh Firefox profile with default settings, with WebRender.
RED means only grayscale anti-aliasing
GREEN means proper subpixel anti-aliasing.

Bookmarks sidebar with WebRender, no subpixel AA

Now if I disable WebRender (gfx.webrender.force-disabled=true) and restart the browser, every text displayed on the screen has subpixel anti-aliasing.

Additional information:

Linux Fedora 34, KDE Plasma 5, Lenovo ThinkPad X220 laptop with Intel HD 3000 graphics, X11.
Firefox 90.0.2 from official Fedora repository.

Attached file contains about:support information when WebRender enabled and when disabled.

The Bugbug bot thinks this bug should belong to the 'Firefox::Address Bar' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Address Bar
Component: Address Bar → General

Passing this to graphics for a first pass.

Component: General → Graphics
Product: Firefox → Core
Summary: No subpixel anti-aliasing in tab bar, address bar, sidebar, bookmark bar with WebRender → [Linux] No subpixel anti-aliasing in tab bar, address bar, sidebar, bookmark bar with WebRender

:gw, can you comment to the bug?

Flags: needinfo?(gwatson)

There's a number of reasons we sometimes don't get subpixel AA where non-WR did (sometimes simple bugs, sometimes a known issue requiring some refactoring to fix, sometimes a deliberate choice to enable optimizations / integration with the system compositor where it's not feasible).

I'll need to investigate each of these cases to see which of the above they fall in to.

I suspect this might be one of the easier cases to fix (we may not be calculating an appropriate opaque background region rect if the picture cache slice background has a rounded rect clip on it, which we can handle easily enough if that's the case).

Assignee: nobody → gwatson
Flags: needinfo?(gwatson)

I was able to get a WR capture of the issue with the megabar dropdown open.

The issue is what I suspected - that we don't find a valid (by the current conservative WR definition) background rect that is opaque to enable subpixel AA on that surface.

I hacked out the check for a rounded-rect clip to see if that was the problem. It improves this case, but doesn't fix it. We end up finding a partial opaque background rect which allows subpixel AA on some of the text, but not all.

This still needs further investigation - we should be able to do a better job in WR of finding and opaque background rect for this case, I think, which would enable subpixel AA on the entire surface. Another option is to try and change the front-end UI to have a complete opaque background rect in the display list here, but I don't think that should be necessary.

Summary: [Linux] No subpixel anti-aliasing in tab bar, address bar, sidebar, bookmark bar with WebRender → No subpixel anti-aliasing in tab bar, address bar, sidebar, bookmark bar with WebRender
Version: Firefox 90 → Firefox 91

This also applies to Firefox 91 on Windows. Not only Linux.

Version: Firefox 91 → Firefox 92
Version: Firefox 92 → Firefox 93

The issue present in Firefox 93.
The issue also applies to Thunderbird 91 (https://bugzilla.mozilla.org/show_bug.cgi?id=1732583).

Severity: -- → S4
Status: UNCONFIRMED → NEW
Component: Graphics → Graphics: WebRender
Ever confirmed: true
Version: Firefox 93 → Firefox 94
Duplicate of this bug: 1732583
OS: Unspecified → All
Hardware: Unspecified → All
Blocks: 1729198
Blocks: 1733808

Darkspirit, bug 1732583 is for Thunderbird. This bug is for Firefox.

No longer blocks: 1733808

Wayne Mery, seems I've accidentally removed the depending bug bug can't apply it again.

"Product: Core" affects Firefox and Thunderbird.

Blocks: 1733808

Please leave the "version" field set to the version with which the bug was originally reported. We can track future/other affected versions using the status flags (which are already set for this bug anyway).

Version: Firefox 94 → Firefox 91
Version: Firefox 91 → Firefox 90

Sometimes subpixel anti-aliasing is not used on the websites as well.
For example, I've just spotted it on this page: https://qna.habr.com/q/1106580#comment_2967552
But after refreshing the page subpixel anti-aliasing is usually applies again.
Seen that at least twice on different websites.

(In reply to ValdikSS from comment #17)

Sometimes subpixel anti-aliasing is not used on the websites as well.
For example, I've just spotted it on this page: https://qna.habr.com/q/1106580#comment_2967552
But after refreshing the page subpixel anti-aliasing is usually applies again.
Seen that at least twice on different websites.

Please file a separate bug for this, the fix is likely going to need to be different.

See Also: → 1770816
Blocks: 1782834

Firefox 103.0.2.
Everything is the same (no subpixel anti-aliasing in many places), except now the active tab text does have subpixel anti-aliasing.

(In reply to Glenn Watson [:gw] from comment #9)

I was able to get a WR capture of the issue with the megabar dropdown open.

The issue is what I suspected - that we don't find a valid (by the current conservative WR definition) background rect that is opaque to enable subpixel AA on that surface.

I hacked out the check for a rounded-rect clip to see if that was the problem. It improves this case, but doesn't fix it. We end up finding a partial opaque background rect which allows subpixel AA on some of the text, but not all.

This still needs further investigation - we should be able to do a better job in WR of finding and opaque background rect for this case, I think, which would enable subpixel AA on the entire surface.

Is that investigation happening in bug 1770816? Or a different bug?

Flags: needinfo?(gwatson)

I'm not actively working on it right now. I did find that some of the cases are caused by XUL views which are blob rasterized, these cases will likely need to converted to use WR display items. Some of the other cases are related to the WR issue mentioned above.

Flags: needinfo?(gwatson)
You need to log in before you can comment on or make changes to this bug.