Wayland color management

Another point that needs an answer is how to handle HDR/tone mapping.

I don’t see that a great deal more explanation is needed for a general approach: If the source is SDR and the destination is HDR, scale the SDR white to be the declared diffuse white in HDR space.

I would only add two requirements here:

  • Diffuse white level in HDR mode must be configurable by the user
  • Configured diffuse white level should be available to the applications via API.

The second point is needed in case application renders GUI and an HDR image on the same surface. Windows implements only the first requirement, and the second one is not available in normal API (yet).