protocol: wl_shm uses pre-multiplied alpha

Add a note about pre-multiplied alpha for all wl_shm formats.
Include an escape hatch in the spec to allow other protocol
extensions to override this.

Signed-off-by: Simon Ser <contact@emersion.fr>
Closes: https://gitlab.freedesktop.org/wayland/wayland/-/issues/61
This commit is contained in:
Simon Ser 2021-10-31 12:10:08 +01:00
parent ca893075ef
commit ebfc70cdf7

View File

@ -296,6 +296,9 @@
The drm format codes match the macros defined in drm_fourcc.h, except The drm format codes match the macros defined in drm_fourcc.h, except
argb8888 and xrgb8888. The formats actually supported by the compositor argb8888 and xrgb8888. The formats actually supported by the compositor
will be reported by the format event. will be reported by the format event.
For all wl_shm formats and unless specified in another protocol
extension, pre-multiplied alpha is used for pixel values.
</description> </description>
<!-- Note to protocol writers: don't update this list manually, instead <!-- Note to protocol writers: don't update this list manually, instead
run the automated script that keeps it in sync with drm_fourcc.h. --> run the automated script that keeps it in sync with drm_fourcc.h. -->