Color management
There is work underway on a color management protocol for Wayland: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/14
At the same time, people have been interested in 'gamma correction' (see !3059 or #3787 (comment 1261139)).
And there has been interest in supporting HDR in the desktop for a while now.
This issue is an attempt to outline our initial vision for how color management can fit into GTK.
- Negotiate surface colorspace information (mainly hdr / not hdr) with the compositor (using that Wayland protocol)
- Make that information available (gdk_surface_is_hdr or somesuch)
- Make gsk create a suitable framebuffer for the colorspace of the surface
- Add a suitable texture format for HDR content (or more generally, content with known colorspace)
- Add image loading apis that can produce content with known colorspace (eg aply GAMA when loading from pngs)
- Assume content we provide in render nodes is linear
- It will be the applications responsibility to provide linear content (using those image loading apis)
- It will be the compositors responsibility to convert the framebuffer from the surface colorspace to whatever the monitor expects)