From aa2a6d560bb2ec39b0643103942dc7b3dfa5976c Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Wed, 6 Mar 2024 11:19:09 +0100 Subject: [PATCH] protocol: document that color channels provide electrical values Expand the work done in [1] to document that all channels store electrical values. See the discussion in [2]. [1]: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/316 [2]: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/250#note_2311377 Signed-off-by: Simon Ser --- protocol/wayland.xml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/protocol/wayland.xml b/protocol/wayland.xml index 31daa748..d817a6e2 100644 --- a/protocol/wayland.xml +++ b/protocol/wayland.xml @@ -479,8 +479,10 @@ client provides and updates the contents is defined by the buffer factory interface. - If the buffer uses a format that has an alpha channel, the alpha channel - is assumed to be premultiplied in the electrical color channel values + Color channels are assumed to be electrical rather than optical (in other + words, encoded with a transfer function) unless otherwise specified. If + the buffer uses a format that has an alpha channel, the alpha channel is + assumed to be premultiplied into the electrical color channel values (after transfer function encoding) unless otherwise specified. Note, because wl_buffer objects are created from multiple independent