Open Bug 1850332 Opened 1 year ago Updated 9 months ago

Support 10-bit color on Wayland

Categories

(Core :: Widget: Gtk, enhancement)

Firefox 116
enhancement

Tracking

()

UNCONFIRMED

People

(Reporter: d3dx12.xx, Unassigned)

References

(Blocks 1 open bug)

Details

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

Steps to reproduce:

  1. Use 10-bit output and a compositor supporting that (KWin in my case)
  2. Try https://github.com/jursonovicst/gradient
  3. Compare mpv on Wayland (10-bit), mpv on Xwayland (8-bit) and Firefox (Wayland)

Actual results:

Firefox Wayland looks like mpv Xwayland with color banding present, which means its color output is limited to 8 bits.

Expected results:

Firefox should render videos in 10 bit when Wayland compositor allows such pixel formats

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

Firefox does not yet support 10bit rendering on any platform, unfortunately, so this is not a Wayland specific feature request. Further more using using a 1010102 format would only leave us with 2 alpha bits - which is not enough for CSD window decorations.

There is ongoing cross-platform work in this direction, but I wouldn't hold my breath yet. It's much more work in a browser than it is for a client like mpv (even though we might be able to use subsurfaces with 10bit formats in certain situations like for video or webgl - still quite a lot of work).

Thanks for your reply! Maybe on Wayland subsurfaces can be used for everything except CSD so that the shadow stays ARGB8888 while web content can be XRGB2101010. Video can be overlaid as YUV surfaces for compositor/hardware to handle in the most efficient way.

Yes, I fully agree. There's quite some work to be done in lower levels like Webrender before we can do this though.

One good news is that Gnome/Mutter, which many devs and users use, will introduce support for both YUV surfaces[1] and 10bit[2] in the upcoming 45 release, increasing the incentive to work on these things in FF.

1: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2191
2: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3139 (not merged yet)

Looks like the only place where 10bit is already supported is on MacOS when offloading video to the compositor. I.e. what we would do when we'd put video into a YUV subsurface.

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