color-representation-v1: add protocol error for invalid chroma location

Clients are allowed to send any value from the enum (unlike other
requests where only supported values are allowed), however clients
are not allowed to send out-of-enum values.

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2025-07-16 20:58:36 +02:00
parent abd33a52d8
commit 46f46863b7

View file

@ -145,6 +145,8 @@
summary="the pixel format and a set value are incompatible"/> summary="the pixel format and a set value are incompatible"/>
<entry name="inert" value="4" <entry name="inert" value="4"
summary="forbidden request on inert object"/> summary="forbidden request on inert object"/>
<entry name="chroma_location" value="5"
summary="invalid chroma location"/>
</enum> </enum>
<request name="destroy" type="destructor"> <request name="destroy" type="destructor">
@ -412,6 +414,9 @@
chroma samples, corresponding to Chroma420SampleLocType code points in chroma samples, corresponding to Chroma420SampleLocType code points in
H.273. H.273.
An invalid chroma location enum value raises the "chroma_location"
protocol error.
A call to wl_surface.commit verifies that the pixel format and chroma A call to wl_surface.commit verifies that the pixel format and chroma
location type in the committed surface contents are compatible, if location type in the committed surface contents are compatible, if
contents exist. The "pixel_format" protocol error is raised otherwise. contents exist. The "pixel_format" protocol error is raised otherwise.