Debian Codegraph @

src/3rdparty/wayland/protocols/color-management/color-management-v1.xml

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2 <protocol name="color_management_v1">
3 <copyright>
4 Copyright 2019 Sebastian Wick
5 Copyright 2019 Erwin Burema
6 Copyright 2020 AMD
7 Copyright 2020-2024 Collabora, Ltd.
8 Copyright 2024 Xaver Hugl
9 Copyright 2022-2025 Red Hat, Inc.
10
11 Permission is hereby granted, free of charge, to any person obtaining a
12 copy of this software and associated documentation files (the "Software"),
13 to deal in the Software without restriction, including without limitation
14 the rights to use, copy, modify, merge, publish, distribute, sublicense,
15 and/or sell copies of the Software, and to permit persons to whom the
16 Software is furnished to do so, subject to the following conditions:
17
18 The above copyright notice and this permission notice (including the next
19 paragraph) shall be included in all copies or substantial portions of the
20 Software.
21
22 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
24 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
25 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
26 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
27 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
28 DEALINGS IN THE SOFTWARE.
29 </copyright>
30
31 <description summary="color management protocol">
32 The aim of the color management extension is to allow clients to know
33 the color properties of outputs, and to tell the compositor about the color
34 properties of their content on surfaces. Doing this enables a compositor
35 to perform automatic color management of content for different outputs
36 according to how content is intended to look like.
37
38 The color properties are represented as an image description object which
39 is immutable after it has been created. A wl_output always has an
40 associated image description that clients can observe. A wl_surface
41 always has an associated preferred image description as a hint chosen by
42 the compositor that clients can also observe. Clients can set an image
43 description on a wl_surface to denote the color characteristics of the
44 surface contents.
45
46 An image description includes SDR and HDR colorimetry and encoding, HDR
47 metadata, and viewing environment parameters. An image description does
48 not include the properties set through color-representation extension.
49 It is expected that the color-representation extension is used in
50 conjunction with the color management extension when necessary,
51 particularly with the YUV family of pixel formats.
52
53 Recommendation ITU-T H.273
54 "Coding-independent code points for video signal type identification"
55 shall be referred to as simply H.273 here.
56
57 The color-and-hdr repository
58 (https://gitlab.freedesktop.org/pq/color-and-hdr) contains
59 background information on the protocol design and legacy color management.
60 It also contains a glossary, learning resources for digital color, tools,
61 samples and more.
62
63 The terminology used in this protocol is based on common color science and
64 color encoding terminology where possible. The glossary in the color-and-hdr
65 repository shall be the authority on the definition of terms in this
66 protocol.
67
68 Warning! The protocol described in this file is currently in the testing
69 phase. Backward compatible changes may be added together with the
70 corresponding interface version bump. Backward incompatible changes can
71 only be done by creating a new major version of the extension.
72 </description>
73
74 <interface name="wp_color_manager_v1" version="1">
75 <description summary="color manager singleton">
76 A singleton global interface used for getting color management extensions
77 for wl_surface and wl_output objects, and for creating client defined
78 image description objects. The extension interfaces allow
79 getting the image description of outputs and setting the image
80 description of surfaces.
81
82 Compositors should never remove this global.
83 </description>
84
85 <request name="destroy" type="destructor">
86 <description summary="destroy the color manager">
87 Destroy the wp_color_manager_v1 object. This does not affect any other
88 objects in any way.
89 </description>
90 </request>
91
92 <enum name="error">
93 <entry name="unsupported_feature" value="0"
94 summary="request not supported"/>
95 <entry name="surface_exists" value="1"
96 summary="color management surface exists already"/>
97 </enum>
98
99 <enum name="render_intent">
100 <description summary="rendering intents">
101 See the ICC.1:2022 specification from the International Color Consortium
102 for more details about rendering intents.
103
104 The principles of ICC defined rendering intents apply with all types of
105 image descriptions, not only those with ICC file profiles.
106
107 Compositors must support the perceptual rendering intent. Other
108 rendering intents are optional.
109 </description>
110
111 <entry name="perceptual" value="0"
112 summary="perceptual"/>
113 <entry name="relative" value="1"
114 summary="media-relative colorimetric"/>
115 <entry name="saturation" value="2"
116 summary="saturation"/>
117 <entry name="absolute" value="3"
118 summary="ICC-absolute colorimetric"/>
119 <entry name="relative_bpc" value="4"
120 summary="media-relative colorimetric + black point compensation"/>
121 </enum>
122
123 <enum name="feature">
124 <description summary="compositor supported features"/>
125
126 <entry name="icc_v2_v4" value="0"
127 summary="create_icc_creator request"/>
128 <entry name="parametric" value="1"
129 summary="create_parametric_creator request"/>
130 <entry name="set_primaries" value="2"
131 summary="parametric set_primaries request"/>
132 <entry name="set_tf_power" value="3"
133 summary="parametric set_tf_power request"/>
134 <entry name="set_luminances" value="4"
135 summary="parametric set_luminances request"/>
136 <entry name="set_mastering_display_primaries" value="5">
137 <description summary="parametric set_mastering_display_primaries request">
138 The compositor supports set_mastering_display_primaries request with a
139 target color volume fully contained inside the primary color volume.
140 </description>
141 </entry>
142 <entry name="extended_target_volume" value="6">
143 <description summary="parametric target exceeds primary color volume">
144 The compositor additionally supports target color volumes that
145 extend outside of the primary color volume.
146
147 This can only be advertised if feature set_mastering_display_primaries
148 is supported as well.
149 </description>
150 </entry>
151 <entry name="windows_scrgb" value="7"
152 summary="create_windows_scrgb request"/>
153 </enum>
154
155 <enum name="primaries">
156 <description summary="named color primaries">
157 Named color primaries used to encode well-known sets of primaries. H.273
158 is the authority, when it comes to the exact values of primaries and
159 authoritative specifications, where an equivalent code point exists.
160
161 A value of 0 is invalid and will never be present in the list of enums.
162
163 Descriptions do list the specifications for convenience.
164 </description>
165
166 <entry name="srgb" value="1">
167 <description summary="Color primaries for the sRGB color space as defined by the BT.709 standard">
168 Color primaries as defined by
169 - Rec. ITU-R BT.709-6
170 - Rec. ITU-R BT.1361-0 conventional colour gamut system and extended
171 colour gamut system (historical)
172 - IEC 61966-2-1 sRGB or sYCC
173 - IEC 61966-2-4
174 - Society of Motion Picture and Television Engineers (SMPTE) RP 177
175 (1993) Annex B
176 Equivalent to H.273 ColourPrimaries code point 1.
177 </description>
178 </entry>
179 <entry name="pal_m" value="2">
180 <description summary="Color primaries for PAL-M as defined by the BT.470 standard">
181 Color primaries as defined by
182 - Rec. ITU-R BT.470-6 System M (historical)
183 - United States National Television System Committee 1953
184 Recommendation for transmission standards for color television
185 - United States Federal Communications Commission (2003) Title 47 Code
186 of Federal Regulations 73.682 (a)(20)
187 Equivalent to H.273 ColourPrimaries code point 4.
188 </description>
189 </entry>
190 <entry name="pal" value="3">
191 <description summary="Color primaries for PAL as defined by the BT.601 standard">
192 Color primaries as defined by
193 - Rec. ITU-R BT.470-6 System B, G (historical)
194 - Rec. ITU-R BT.601-7 625
195 - Rec. ITU-R BT.1358-0 625 (historical)
196 - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
197 Equivalent to H.273 ColourPrimaries code point 5.
198 </description>
199 </entry>
200 <entry name="ntsc" value="4">
201 <description summary="Color primaries for NTSC as defined by the BT.601 standard">
202 Color primaries as defined by
203 - Rec. ITU-R BT.601-7 525
204 - Rec. ITU-R BT.1358-1 525 or 625 (historical)
205 - Rec. ITU-R BT.1700-0 NTSC
206 - SMPTE 170M (2004)
207 - SMPTE 240M (1999) (historical)
208 Equivalent to H.273 ColourPrimaries code point 6 and 7.
209 </description>
210 </entry>
211 <entry name="generic_film" value="5">
212 <description summary="Generic film with colour filters using Illuminant C">
213 Color primaries as defined by H.273 for generic film.
214 Equivalent to H.273 ColourPrimaries code point 8.
215 </description>
216 </entry>
217 <entry name="bt2020" value="6">
218 <description summary="Color primaries as defined by the BT.2020 and BT.2100 standard">
219 Color primaries as defined by
220 - Rec. ITU-R BT.2020-2
221 - Rec. ITU-R BT.2100-0
222 Equivalent to H.273 ColourPrimaries code point 9.
223 </description>
224 </entry>
225 <entry name="cie1931_xyz" value="7">
226 <description summary="Color primaries of the full CIE 1931 XYZ color space">
227 Color primaries as defined as the maximum of the CIE 1931 XYZ color
228 space by
229 - SMPTE ST 428-1
230 - (CIE 1931 XYZ as in ISO 11664-1)
231 Equivalent to H.273 ColourPrimaries code point 10.
232 </description>
233 </entry>
234 <entry name="dci_p3" value="8">
235 <description summary="Color primaries of the DCI P3 color space as defined by the SMPTE RP 431 standard">
236 Color primaries as defined by Digital Cinema System and published in
237 SMPTE RP 431-2 (2011). Equivalent to H.273 ColourPrimaries code point
238 11.
239 </description>
240 </entry>
241 <entry name="display_p3" value="9">
242 <description summary="Color primaries of Display P3 variant of the DCI-P3 color space as defined by the SMPTE EG 432 standard">
243 Color primaries as defined by Digital Cinema System and published in
244 SMPTE EG 432-1 (2010).
245 Equivalent to H.273 ColourPrimaries code point 12.
246 </description>
247 </entry>
248 <entry name="adobe_rgb" value="10">
249 <description summary="Color primaries of the Adobe RGB color space as defined by the ISO 12640 standard">
250 Color primaries as defined by Adobe as "Adobe RGB" and later published
251 by ISO 12640-4 (2011).
252 </description>
253 </entry>
254 </enum>
255
256 <enum name="transfer_function">
257 <description summary="named transfer functions">
258 Named transfer functions used to represent well-known transfer
259 characteristics. H.273 is the authority, when it comes to the exact
260 formulas and authoritative specifications, where an equivalent code
261 point exists.
262
263 A value of 0 is invalid and will never be present in the list of enums.
264
265 Descriptions do list the specifications for convenience.
266 </description>
267
268 <entry name="bt1886" value="1">
269 <description summary="BT.1886 display transfer characteristic">
270 Rec. ITU-R BT.1886 is the display transfer characteristic assumed by
271 - Rec. ITU-R BT.601-7 525 and 625
272 - Rec. ITU-R BT.709-6
273 - Rec. ITU-R BT.2020-2
274 These recommendations are referred to by H.273 TransferCharacteristics
275 code points 1, 6, 14, and 15, which are all equivalent.
276
277 This TF implies these default luminances from Rec. ITU-R BT.2035:
278 - primary color volume minimum: 0.01 cd/m²
279 - primary color volume maximum: 100 cd/m²
280 - reference white: 100 cd/m²
281 </description>
282 </entry>
283 <entry name="gamma22" value="2">
284 <description summary="Assumed display gamma 2.2 transfer function">
285 Transfer characteristics as defined by
286 - Rec. ITU-R BT.470-6 System M (historical)
287 - United States National Television System Committee 1953
288 Recommendation for transmission standards for color television
289 - United States Federal Communications Commission (2003) Title 47 Code
290 of Federal Regulations 73.682 (a) (20)
291 - Rec. ITU-R BT.1700-0 625 PAL and 625 SECAM
292 Equivalent to H.273 TransferCharacteristics code point 4.
293
294 Note: an sRGB display (IEC 61966-2-1) uses this transfer function.
295 </description>
296 </entry>
297 <entry name="gamma28" value="3">
298 <description summary="Assumed display gamma 2.8 transfer function">
299 Transfer characteristics as defined by
300 - Rec. ITU-R BT.470-6 System B, G (historical)
301 Equivalent to H.273 TransferCharacteristics code point 5.
302 </description>
303 </entry>
304 <entry name="st240" value="4">
305 <description summary="SMPTE ST 240 transfer function">
306 Transfer characteristics as defined by
307 - SMPTE ST 240 (1999)
308 Equivalent to H.273 TransferCharacteristics code point 7.
309 </description>
310 </entry>
311 <entry name="ext_linear" value="5">
312 <description summary="extended linear transfer function">
313 Linear transfer function defined over all real numbers.
314 Normalised electrical values are equal the normalised optical values.
315
316 The differences to H.273 TransferCharacteristics code point 8 are
317 the definition over all real numbers.
318 </description>
319 </entry>
320 <entry name="log_100" value="6">
321 <description summary="logarithmic 100:1 transfer function">
322 Logarithmic transfer characteristic (100:1 range).
323 Equivalent to H.273 TransferCharacteristics code point 9.
324 </description>
325 </entry>
326 <entry name="log_316" value="7">
327 <description summary="logarithmic (100*Sqrt(10) : 1) transfer function">
328 Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range).
329 Equivalent to H.273 TransferCharacteristics code point 10.
330 </description>
331 </entry>
332 <entry name="xvycc" value="8">
333 <description summary="IEC 61966-2-4 transfer function">
334 Transfer characteristics as defined by
335 - IEC 61966-2-4
336 Equivalent to H.273 TransferCharacteristics code point 11.
337 </description>
338 </entry>
339 <entry name="srgb" value="9">
340 <description summary="sRGB piece-wise transfer function">
341 Transfer characteristics as defined by
342 - IEC 61966-2-1 sRGB
343 Equivalent to H.273 TransferCharacteristics code point 13 with
344 MatrixCoefficients set to 0.
345
346 Note: This is not appropriate for describing sRGB material.
347 sRGB material is intended to be viewed on an sRGB display, and
348 that is described by gamma22.
349 </description>
350 </entry>
351 <entry name="ext_srgb" value="10">
352 <description summary="Extended sRGB piece-wise transfer function">
353 Transfer characteristics as defined by
354 - IEC 61966-2-1 sYCC
355 Equivalent to H.273 TransferCharacteristics code point 13 with
356 MatrixCoefficients set to anything but 0.
357 </description>
358 </entry>
359 <entry name="st2084_pq" value="11">
360 <description summary="perceptual quantizer transfer function">
361 Transfer characteristics as defined by
362 - SMPTE ST 2084 (2014) for 10-, 12-, 14- and 16-bit systems
363 - Rec. ITU-R BT.2100-2 perceptual quantization (PQ) system
364 Equivalent to H.273 TransferCharacteristics code point 16.
365
366 This TF implies these default luminances
367 - primary color volume minimum: 0.005 cd/m²
368 - primary color volume maximum: 10000 cd/m²
369 - reference white: 203 cd/m²
370
371 The difference between the primary color volume minimum and maximum
372 must be approximately 10000 cd/m² as that is the swing of the EOTF
373 defined by ST 2084 and BT.2100. The default value for the
374 reference white is a protocol addition: it is suggested by
375 Report ITU-R BT.2408-7 and is not part of ST 2084 or BT.2100.
376 </description>
377 </entry>
378 <entry name="st428" value="12">
379 <description summary="SMPTE ST 428 transfer function">
380 Transfer characteristics as defined by
381 - SMPTE ST 428-1 (2019)
382 Equivalent to H.273 TransferCharacteristics code point 17.
383 </description>
384 </entry>
385 <entry name="hlg" value="13">
386 <description summary="hybrid log-gamma transfer function">
387 Transfer characteristics as defined by
388 - ARIB STD-B67 (2015)
389 - Rec. ITU-R BT.2100-2 hybrid log-gamma (HLG) system
390 Equivalent to H.273 TransferCharacteristics code point 18.
391
392 This TF implies these default luminances
393 - primary color volume minimum: 0.005 cd/m²
394 - primary color volume maximum: 1000 cd/m²
395 - reference white: 203 cd/m²
396
397 HLG is a relative display-referred signal with a specified
398 non-linear mapping to the display peak luminance (the HLG OOTF).
399 All absolute luminance values used here for HLG assume a 1000 cd/m²
400 peak display.
401
402 The default value for the reference white is a protocol addition:
403 it is suggested by Report ITU-R BT.2408-7 and is not part of
404 ARIB STD-B67 or BT.2100.
405 </description>
406 </entry>
407 </enum>
408
409 <request name="get_output">
410 <description summary="create a color management interface for a wl_output">
411 This creates a new wp_color_management_output_v1 object for the
412 given wl_output.
413
414 See the wp_color_management_output_v1 interface for more details.
415 </description>
416
417 <arg name="id" type="new_id" interface="wp_color_management_output_v1"/>
418 <arg name="output" type="object" interface="wl_output"/>
419 </request>
420
421 <request name="get_surface">
422 <description summary="create a color management interface for a wl_surface">
423 If a wp_color_management_surface_v1 object already exists for the given
424 wl_surface, the protocol error surface_exists is raised.
425
426 This creates a new color wp_color_management_surface_v1 object for the
427 given wl_surface.
428
429 See the wp_color_management_surface_v1 interface for more details.
430 </description>
431
432 <arg name="id" type="new_id" interface="wp_color_management_surface_v1"/>
433 <arg name="surface" type="object" interface="wl_surface"/>
434 </request>
435
436 <request name="get_surface_feedback">
437 <description summary="create a color management feedback interface">
438 This creates a new color wp_color_management_surface_feedback_v1 object
439 for the given wl_surface.
440
441 See the wp_color_management_surface_feedback_v1 interface for more
442 details.
443 </description>
444
445 <arg name="id" type="new_id"
446 interface="wp_color_management_surface_feedback_v1"/>
447 <arg name="surface" type="object" interface="wl_surface"/>
448 </request>
449
450 <request name="create_icc_creator">
451 <description summary="make a new ICC-based image description creator object">
452 Makes a new ICC-based image description creator object with all
453 properties initially unset. The client can then use the object's
454 interface to define all the required properties for an image description
455 and finally create a wp_image_description_v1 object.
456
457 This request can be used when the compositor advertises
458 wp_color_manager_v1.feature.icc_v2_v4.
459 Otherwise this request raises the protocol error unsupported_feature.
460 </description>
461
462 <arg name="obj"
463 type="new_id" interface="wp_image_description_creator_icc_v1"
464 summary="the new creator object"/>
465 </request>
466
467 <request name="create_parametric_creator">
468 <description summary="make a new parametric image description creator object">
469 Makes a new parametric image description creator object with all
470 properties initially unset. The client can then use the object's
471 interface to define all the required properties for an image description
472 and finally create a wp_image_description_v1 object.
473
474 This request can be used when the compositor advertises
475 wp_color_manager_v1.feature.parametric.
476 Otherwise this request raises the protocol error unsupported_feature.
477 </description>
478
479 <arg name="obj"
480 type="new_id" interface="wp_image_description_creator_params_v1"
481 summary="the new creator object"/>
482 </request>
483
484 <request name="create_windows_scrgb">
485 <description summary="create Windows-scRGB image description object">
486 This creates a pre-defined image description for the so-called
487 Windows-scRGB stimulus encoding. This comes from the Windows 10 handling
488 of its own definition of an scRGB color space for an HDR screen
489 driven in BT.2100/PQ signalling mode.
490
491 Windows-scRGB uses sRGB (BT.709) color primaries and white point.
492 The transfer characteristic is extended linear.
493
494 The nominal color channel value range is extended, meaning it includes
495 negative and greater than 1.0 values. Negative values are used to
496 escape the sRGB color gamut boundaries. To make use of the extended
497 range, the client needs to use a pixel format that can represent those
498 values, e.g. floating-point 16 bits per channel.
499
500 Nominal color value R=G=B=0.0 corresponds to BT.2100/PQ system
501 0 cd/m², and R=G=B=1.0 corresponds to BT.2100/PQ system 80 cd/m².
502 The maximum is R=G=B=125.0 corresponding to 10k cd/m².
503
504 Windows-scRGB is displayed by Windows 10 by converting it to
505 BT.2100/PQ, maintaining the CIE 1931 chromaticity and mapping the
506 luminance as above. No adjustment is made to the signal to account
507 for the viewing conditions.
508
509 The reference white level of Windows-scRGB is unknown. If a
510 reference white level must be assumed for compositor processing, it
511 should be R=G=B=2.5375 corresponding to 203 cd/m² of Report ITU-R
512 BT.2408-7.
513
514 The target color volume of Windows-scRGB is unknown. The color gamut
515 may be anything between sRGB and BT.2100.
516
517 Note: EGL_EXT_gl_colorspace_scrgb_linear definition differs from
518 Windows-scRGB by using R=G=B=1.0 as the reference white level, while
519 Windows-scRGB reference white level is unknown or varies. However,
520 it seems probable that Windows implements both
521 EGL_EXT_gl_colorspace_scrgb_linear and Vulkan
522 VK_COLOR_SPACE_EXTENDED_SRGB_LINEAR_EXT as Windows-scRGB.
523
524 This request can be used when the compositor advertises
525 wp_color_manager_v1.feature.windows_scrgb.
526 Otherwise this request raises the protocol error unsupported_feature.
527
528 The resulting image description object does not allow get_information
529 request. The wp_image_description_v1.ready event shall be sent.
530 </description>
531
532 <arg name="image_description"
533 type="new_id" interface="wp_image_description_v1"/>
534 </request>
535
536 <event name="supported_intent">
537 <description summary="supported rendering intent">
538 When this object is created, it shall immediately send this event once
539 for each rendering intent the compositor supports.
540 </description>
541
542 <arg name="render_intent" type="uint" enum="render_intent"
543 summary="rendering intent"/>
544 </event>
545
546 <event name="supported_feature">
547 <description summary="supported features">
548 When this object is created, it shall immediately send this event once
549 for each compositor supported feature listed in the enumeration.
550 </description>
551
552 <arg name="feature" type="uint" enum="feature"
553 summary="supported feature"/>
554 </event>
555
556 <event name="supported_tf_named">
557 <description summary="supported named transfer characteristic">
558 When this object is created, it shall immediately send this event once
559 for each named transfer function the compositor supports with the
560 parametric image description creator.
561 </description>
562
563 <arg name="tf" type="uint" enum="transfer_function"
564 summary="Named transfer function"/>
565 </event>
566
567 <event name="supported_primaries_named">
568 <description summary="supported named primaries">
569 When this object is created, it shall immediately send this event once
570 for each named set of primaries the compositor supports with the
571 parametric image description creator.
572 </description>
573
574 <arg name="primaries" type="uint" enum="primaries"
575 summary="Named color primaries"/>
576 </event>
577
578 <event name="done">
579 <description summary="all features have been sent">
580 This event is sent when all supported rendering intents, features,
581 transfer functions and named primaries have been sent.
582 </description>
583 </event>
584 </interface>
585
586 <interface name="wp_color_management_output_v1" version="1">
587 <description summary="output color properties">
588 A wp_color_management_output_v1 describes the color properties of an
589 output.
590
591 The wp_color_management_output_v1 is associated with the wl_output global
592 underlying the wl_output object. Therefore the client destroying the
593 wl_output object has no impact, but the compositor removing the output
594 global makes the wp_color_management_output_v1 object inert.
595 </description>
596
597 <request name="destroy" type="destructor">
598 <description summary="destroy the color management output">
599 Destroy the color wp_color_management_output_v1 object. This does not
600 affect any remaining protocol objects.
601 </description>
602 </request>
603
604 <event name="image_description_changed">
605 <description summary="image description changed">
606 This event is sent whenever the image description of the output changed,
607 followed by one wl_output.done event common to output events across all
608 extensions.
609
610 If the client wants to use the updated image description, it needs to do
611 get_image_description again, because image description objects are
612 immutable.
613 </description>
614 </event>
615
616 <request name="get_image_description">
617 <description summary="get the image description of the output">
618 This creates a new wp_image_description_v1 object for the current image
619 description of the output. There always is exactly one image description
620 active for an output so the client should destroy the image description
621 created by earlier invocations of this request. This request is usually
622 sent as a reaction to the image_description_changed event or when
623 creating a wp_color_management_output_v1 object.
624
625 The image description of an output represents the color encoding the
626 output expects. There might be performance and power advantages, as well
627 as improved color reproduction, if a content update matches the image
628 description of the output it is being shown on. If a content update is
629 shown on any other output than the one it matches the image description
630 of, then the color reproduction on those outputs might be considerably
631 worse.
632
633 The created wp_image_description_v1 object preserves the image
634 description of the output from the time the object was created.
635
636 The resulting image description object allows get_information request.
637
638 If this protocol object is inert, the resulting image description object
639 shall immediately deliver the wp_image_description_v1.failed event with
640 the no_output cause.
641
642 If the interface version is inadequate for the output's image
643 description, meaning that the client does not support all the events
644 needed to deliver the crucial information, the resulting image
645 description object shall immediately deliver the
646 wp_image_description_v1.failed event with the low_version cause.
647
648 Otherwise the object shall immediately deliver the ready event.
649 </description>
650
651 <arg name="image_description"
652 type="new_id" interface="wp_image_description_v1"/>
653 </request>
654 </interface>
655
656 <interface name="wp_color_management_surface_v1" version="1">
657 <description summary="color management extension to a surface">
658 A wp_color_management_surface_v1 allows the client to set the color
659 space and HDR properties of a surface.
660
661 If the wl_surface associated with the wp_color_management_surface_v1 is
662 destroyed, the wp_color_management_surface_v1 object becomes inert.
663 </description>
664
665 <request name="destroy" type="destructor">
666 <description summary="destroy the color management interface for a surface">
667 Destroy the wp_color_management_surface_v1 object and do the same as
668 unset_image_description.
669 </description>
670 </request>
671
672 <enum name="error">
673 <description summary="protocol errors"/>
674 <entry name="render_intent" value="0"
675 summary="unsupported rendering intent"/>
676 <entry name="image_description" value="1"
677 summary="invalid image description"/>
678 <entry name="inert" value="2"
679 summary="forbidden request on inert object"/>
680 </enum>
681
682 <request name="set_image_description">
683 <description summary="set the surface image description">
684 If this protocol object is inert, the protocol error inert is raised.
685
686 Set the image description of the underlying surface. The image
687 description and rendering intent are double-buffered state, see
688 wl_surface.commit.
689
690 It is the client's responsibility to understand the image description
691 it sets on a surface, and to provide content that matches that image
692 description. Compositors might convert images to match their own or any
693 other image descriptions.
694
695 Image descriptions which are not ready (see wp_image_description_v1)
696 are forbidden in this request, and in such case the protocol error
697 image_description is raised.
698
699 All image descriptions which are ready (see wp_image_description_v1)
700 are allowed and must always be accepted by the compositor.
701
702 A rendering intent provides the client's preference on how content
703 colors should be mapped to each output. The render_intent value must
704 be one advertised by the compositor with
705 wp_color_manager_v1.render_intent event, otherwise the protocol error
706 render_intent is raised.
707
708 When an image description is set on a surface, the Transfer
709 Characteristics of the image description defines the valid range of
710 the nominal (real-valued) color channel values. The processing of
711 out-of-range color channel values is undefined, but compositors are
712 recommended to clamp the values to the valid range when possible.
713
714 By default, a surface does not have an associated image description
715 nor a rendering intent. The handling of color on such surfaces is
716 compositor implementation defined. Compositors should handle such
717 surfaces as sRGB, but may handle them differently if they have specific
718 requirements.
719
720 Setting the image description has copy semantics; after this request,
721 the image description can be immediately destroyed without affecting
722 the pending state of the surface.
723 </description>
724
725 <arg name="image_description"
726 type="object" interface="wp_image_description_v1"/>
727 <arg name="render_intent"
728 type="uint" enum="wp_color_manager_v1.render_intent"
729 summary="rendering intent"/>
730 </request>
731
732 <request name="unset_image_description">
733 <description summary="remove the surface image description">
734 If this protocol object is inert, the protocol error inert is raised.
735
736 This request removes any image description from the surface. See
737 set_image_description for how a compositor handles a surface without
738 an image description. This is double-buffered state, see
739 wl_surface.commit.
740 </description>
741 </request>
742 </interface>
743
744 <interface name="wp_color_management_surface_feedback_v1" version="1">
745 <description summary="color management extension to a surface">
746 A wp_color_management_surface_feedback_v1 allows the client to get the
747 preferred image description of a surface.
748
749 If the wl_surface associated with this object is destroyed, the
750 wp_color_management_surface_feedback_v1 object becomes inert.
751 </description>
752
753 <request name="destroy" type="destructor">
754 <description summary="destroy the color management interface for a surface">
755 Destroy the wp_color_management_surface_feedback_v1 object.
756 </description>
757 </request>
758
759 <enum name="error">
760 <description summary="protocol errors"/>
761 <entry name="inert" value="0"
762 summary="forbidden request on inert object"/>
763 <entry name="unsupported_feature" value="1"
764 summary="attempted to use an unsupported feature"/>
765 </enum>
766
767 <event name="preferred_changed">
768 <description summary="the preferred image description changed">
769 The preferred image description is the one which likely has the most
770 performance and/or quality benefits for the compositor if used by the
771 client for its wl_surface contents. This event is sent whenever the
772 compositor changes the wl_surface's preferred image description.
773
774 This event sends the identity of the new preferred state as the argument,
775 so clients who are aware of the image description already can reuse it.
776 Otherwise, if the client client wants to know what the preferred image
777 description is, it shall use the get_preferred request.
778
779 The preferred image description is not automatically used for anything.
780 It is only a hint, and clients may set any valid image description with
781 set_image_description, but there might be performance and color accuracy
782 improvements by providing the wl_surface contents in the preferred
783 image description. Therefore clients that can, should render according
784 to the preferred image description
785 </description>
786
787 <arg name="identity" type="uint" summary="image description id number"/>
788 </event>
789
790 <request name="get_preferred">
791 <description summary="get the preferred image description">
792 If this protocol object is inert, the protocol error inert is raised.
793
794 The preferred image description represents the compositor's preferred
795 color encoding for this wl_surface at the current time. There might be
796 performance and power advantages, as well as improved color
797 reproduction, if the image description of a content update matches the
798 preferred image description.
799
800 This creates a new wp_image_description_v1 object for the currently
801 preferred image description for the wl_surface. The client should
802 stop using and destroy the image descriptions created by earlier
803 invocations of this request for the associated wl_surface.
804 This request is usually sent as a reaction to the preferred_changed
805 event or when creating a wp_color_management_surface_feedback_v1 object
806 if the client is capable of adapting to image descriptions.
807
808 The created wp_image_description_v1 object preserves the preferred image
809 description of the wl_surface from the time the object was created.
810
811 The resulting image description object allows get_information request.
812
813 If the image description is parametric, the client should set it on its
814 wl_surface only if the image description is an exact match with the
815 client content. Particularly if everything else matches, but the target
816 color volume is greater than what the client needs, the client should
817 create its own parameric image description with its exact parameters.
818
819 If the interface version is inadequate for the preferred image
820 description, meaning that the client does not support all the
821 events needed to deliver the crucial information, the resulting image
822 description object shall immediately deliver the
823 wp_image_description_v1.failed event with the low_version cause,
824 otherwise the object shall immediately deliver the ready event.
825 </description>
826
827 <arg name="image_description"
828 type="new_id" interface="wp_image_description_v1"/>
829 </request>
830
831 <request name="get_preferred_parametric">
832 <description summary="get the preferred image description">
833 The same description as for get_preferred applies, except the returned
834 image description is guaranteed to be parametric. This is meant for
835 clients that can only deal with parametric image descriptions.
836
837 If the compositor doesn't support parametric image descriptions, the
838 unsupported_feature error is emitted.
839 </description>
840
841 <arg name="image_description"
842 type="new_id" interface="wp_image_description_v1"/>
843 </request>
844 </interface>
845
846 <interface name="wp_image_description_creator_icc_v1" version="1">
847 <description summary="holder of image description ICC information">
848 This type of object is used for collecting all the information required
849 to create a wp_image_description_v1 object from an ICC file. A complete
850 set of required parameters consists of these properties:
851 - ICC file
852
853 Each required property must be set exactly once if the client is to create
854 an image description. The set requests verify that a property was not
855 already set. The create request verifies that all required properties are
856 set. There may be several alternative requests for setting each property,
857 and in that case the client must choose one of them.
858
859 Once all properties have been set, the create request must be used to
860 create the image description object, destroying the creator in the
861 process.
862 </description>
863
864 <enum name="error">
865 <description summary="protocol errors"/>
866
867 <entry name="incomplete_set" value="0"
868 summary="incomplete parameter set"/>
869 <entry name="already_set" value="1"
870 summary="property already set"/>
871 <entry name="bad_fd" value="2"
872 summary="fd not seekable and readable"/>
873 <entry name="bad_size" value="3"
874 summary="no or too much data"/>
875 <entry name="out_of_file" value="4"
876 summary="offset + length exceeds file size"/>
877 </enum>
878
879 <request name="create" type="destructor">
880 <description summary="Create the image description object from ICC data">
881 Create an image description object based on the ICC information
882 previously set on this object. A compositor must parse the ICC data in
883 some undefined but finite amount of time.
884
885 The completeness of the parameter set is verified. If the set is not
886 complete, the protocol error incomplete_set is raised. For the
887 definition of a complete set, see the description of this interface.
888
889 If the particular combination of the information is not supported
890 by the compositor, the resulting image description object shall
891 immediately deliver the wp_image_description_v1.failed event with the
892 'unsupported' cause. If a valid image description was created from the
893 information, the wp_image_description_v1.ready event will eventually
894 be sent instead.
895
896 This request destroys the wp_image_description_creator_icc_v1 object.
897
898 The resulting image description object does not allow get_information
899 request.
900 </description>
901
902 <arg name="image_description"
903 type="new_id" interface="wp_image_description_v1"/>
904 </request>
905
906 <request name="set_icc_file">
907 <description summary="set the ICC profile file">
908 Sets the ICC profile file to be used as the basis of the image
909 description.
910
911 The data shall be found through the given fd at the given offset, having
912 the given length. The fd must be seekable and readable. Violating these
913 requirements raises the bad_fd protocol error.
914
915 If reading the data fails due to an error independent of the client, the
916 compositor shall send the wp_image_description_v1.failed event on the
917 created wp_image_description_v1 with the 'operating_system' cause.
918
919 The maximum size of the ICC profile is 32 MB. If length is greater than
920 that or zero, the protocol error bad_size is raised. If offset + length
921 exceeds the file size, the protocol error out_of_file is raised.
922
923 A compositor may read the file at any time starting from this request
924 and only until whichever happens first:
925 - If create request was issued, the wp_image_description_v1 object
926 delivers either failed or ready event; or
927 - if create request was not issued, this
928 wp_image_description_creator_icc_v1 object is destroyed.
929
930 A compositor shall not modify the contents of the file, and the fd may
931 be sealed for writes and size changes. The client must ensure to its
932 best ability that the data does not change while the compositor is
933 reading it.
934
935 The data must represent a valid ICC profile. The ICC profile version
936 must be 2 or 4, it must be a 3 channel profile and the class must be
937 Display or ColorSpace. Violating these requirements will not result in a
938 protocol error, but will eventually send the
939 wp_image_description_v1.failed event on the created
940 wp_image_description_v1 with the 'unsupported' cause.
941
942 See the International Color Consortium specification ICC.1:2022 for more
943 details about ICC profiles.
944
945 If ICC file has already been set on this object, the protocol error
946 already_set is raised.
947 </description>
948
949 <arg name="icc_profile" type="fd"
950 summary="ICC profile"/>
951 <arg name="offset" type="uint"
952 summary="byte offset in fd to start of ICC data"/>
953 <arg name="length" type="uint"
954 summary="length of ICC data in bytes"/>
955 </request>
956 </interface>
957
958 <interface name="wp_image_description_creator_params_v1" version="1">
959 <description summary="holder of image description parameters">
960 This type of object is used for collecting all the parameters required
961 to create a wp_image_description_v1 object. A complete set of required
962 parameters consists of these properties:
963 - transfer characteristic function (tf)
964 - chromaticities of primaries and white point (primary color volume)
965
966 The following properties are optional and have a well-defined default
967 if not explicitly set:
968 - primary color volume luminance range
969 - reference white luminance level
970 - mastering display primaries and white point (target color volume)
971 - mastering luminance range
972
973 The following properties are optional and will be ignored
974 if not explicitly set:
975 - maximum content light level
976 - maximum frame-average light level
977
978 Each required property must be set exactly once if the client is to create
979 an image description. The set requests verify that a property was not
980 already set. The create request verifies that all required properties are
981 set. There may be several alternative requests for setting each property,
982 and in that case the client must choose one of them.
983
984 Once all properties have been set, the create request must be used to
985 create the image description object, destroying the creator in the
986 process.
987 </description>
988
989 <enum name="error">
990 <description summary="protocol errors"/>
991
992 <entry name="incomplete_set" value="0"
993 summary="incomplete parameter set"/>
994 <entry name="already_set" value="1"
995 summary="property already set"/>
996 <entry name="unsupported_feature" value="2"
997 summary="request not supported"/>
998 <entry name="invalid_tf" value="3"
999 summary="invalid transfer characteristic"/>
1000 <entry name="invalid_primaries_named" value="4"
1001 summary="invalid primaries named"/>
1002 <entry name="invalid_luminance" value="5"
1003 summary="invalid luminance value or range"/>
1004 </enum>
1005
1006 <request name="create" type="destructor">
1007 <description summary="Create the image description object using params">
1008 Create an image description object based on the parameters previously
1009 set on this object.
1010
1011 The completeness of the parameter set is verified. If the set is not
1012 complete, the protocol error incomplete_set is raised. For the
1013 definition of a complete set, see the description of this interface.
1014
1015 The protocol error invalid_luminance is raised if any of the following
1016 requirements is not met:
1017 - When max_cll is set, it must be greater than min L and less or equal
1018 to max L of the mastering luminance range.
1019 - When max_fall is set, it must be greater than min L and less or equal
1020 to max L of the mastering luminance range.
1021 - When both max_cll and max_fall are set, max_fall must be less or equal
1022 to max_cll.
1023
1024 If the particular combination of the parameter set is not supported
1025 by the compositor, the resulting image description object shall
1026 immediately deliver the wp_image_description_v1.failed event with the
1027 'unsupported' cause. If a valid image description was created from the
1028 parameter set, the wp_image_description_v1.ready event will eventually
1029 be sent instead.
1030
1031 This request destroys the wp_image_description_creator_params_v1
1032 object.
1033
1034 The resulting image description object does not allow get_information
1035 request.
1036 </description>
1037
1038 <arg name="image_description"
1039 type="new_id" interface="wp_image_description_v1"/>
1040 </request>
1041
1042 <request name="set_tf_named">
1043 <description summary="named transfer characteristic">
1044 Sets the transfer characteristic using explicitly enumerated named
1045 functions.
1046
1047 When the resulting image description is attached to an image, the
1048 content should be encoded and decoded according to the industry standard
1049 practices for the transfer characteristic.
1050
1051 Only names advertised with wp_color_manager_v1 event supported_tf_named
1052 are allowed. Other values shall raise the protocol error invalid_tf.
1053
1054 If transfer characteristic has already been set on this object, the
1055 protocol error already_set is raised.
1056 </description>
1057
1058 <arg name="tf" type="uint" enum="wp_color_manager_v1.transfer_function"
1059 summary="named transfer function"/>
1060 </request>
1061
1062 <request name="set_tf_power">
1063 <description summary="transfer characteristic as a power curve">
1064 Sets the color component transfer characteristic to a power curve with
1065 the given exponent. Negative values are handled by mirroring the
1066 positive half of the curve through the origin. The valid domain and
1067 range of the curve are all finite real numbers. This curve represents
1068 the conversion from electrical to optical color channel values.
1069
1070 When the resulting image description is attached to an image, the
1071 content should be encoded with the inverse of the power curve.
1072
1073 The curve exponent shall be multiplied by 10000 to get the argument eexp
1074 value to carry the precision of 4 decimals.
1075
1076 The curve exponent must be at least 1.0 and at most 10.0. Otherwise the
1077 protocol error invalid_tf is raised.
1078
1079 If transfer characteristic has already been set on this object, the
1080 protocol error already_set is raised.
1081
1082 This request can be used when the compositor advertises
1083 wp_color_manager_v1.feature.set_tf_power. Otherwise this request raises
1084 the protocol error unsupported_feature.
1085 </description>
1086
1087 <arg name="eexp" type="uint" summary="the exponent * 10000"/>
1088 </request>
1089
1090 <request name="set_primaries_named">
1091 <description summary="named primaries">
1092 Sets the color primaries and white point using explicitly named sets.
1093 This describes the primary color volume which is the basis for color
1094 value encoding.
1095
1096 Only names advertised with wp_color_manager_v1 event
1097 supported_primaries_named are allowed. Other values shall raise the
1098 protocol error invalid_primaries_named.
1099
1100 If primaries have already been set on this object, the protocol error
1101 already_set is raised.
1102 </description>
1103
1104 <arg name="primaries" type="uint" enum="wp_color_manager_v1.primaries"
1105 summary="named primaries"/>
1106 </request>
1107
1108 <request name="set_primaries">
1109 <description summary="primaries as chromaticity coordinates">
1110 Sets the color primaries and white point using CIE 1931 xy chromaticity
1111 coordinates. This describes the primary color volume which is the basis
1112 for color value encoding.
1113
1114 Each coordinate value is multiplied by 1 million to get the argument
1115 value to carry precision of 6 decimals.
1116
1117 If primaries have already been set on this object, the protocol error
1118 already_set is raised.
1119
1120 This request can be used if the compositor advertises
1121 wp_color_manager_v1.feature.set_primaries. Otherwise this request raises
1122 the protocol error unsupported_feature.
1123 </description>
1124
1125 <arg name="r_x" type="int" summary="Red x * 1M"/>
1126 <arg name="r_y" type="int" summary="Red y * 1M"/>
1127 <arg name="g_x" type="int" summary="Green x * 1M"/>
1128 <arg name="g_y" type="int" summary="Green y * 1M"/>
1129 <arg name="b_x" type="int" summary="Blue x * 1M"/>
1130 <arg name="b_y" type="int" summary="Blue y * 1M"/>
1131 <arg name="w_x" type="int" summary="White x * 1M"/>
1132 <arg name="w_y" type="int" summary="White y * 1M"/>
1133 </request>
1134
1135 <request name="set_luminances">
1136 <description summary="primary color volume luminance range and reference white">
1137 Sets the primary color volume luminance range and the reference white
1138 luminance level. These values include the minimum display emission
1139 and ambient flare luminances, assumed to be optically additive and have
1140 the chromaticity of the primary color volume white point.
1141
1142 The default luminances from
1143 https://www.color.org/chardata/rgb/srgb.xalter are
1144 - primary color volume minimum: 0.2 cd/m²
1145 - primary color volume maximum: 80 cd/m²
1146 - reference white: 80 cd/m²
1147
1148 Setting a named transfer characteristic can imply other default
1149 luminances.
1150
1151 The default luminances get overwritten when this request is used.
1152 With transfer_function.st2084_pq the given 'max_lum' value is ignored,
1153 and 'max_lum' is taken as 'min_lum' + 10000 cd/m².
1154
1155 'min_lum' and 'max_lum' specify the minimum and maximum luminances of
1156 the primary color volume as reproduced by the targeted display.
1157
1158 'reference_lum' specifies the luminance of the reference white as
1159 reproduced by the targeted display, and reflects the targeted viewing
1160 environment.
1161
1162 Compositors should make sure that all content is anchored, meaning that
1163 an input signal level of 'reference_lum' on one image description and
1164 another input signal level of 'reference_lum' on another image
1165 description should produce the same output level, even though the
1166 'reference_lum' on both image representations can be different.
1167
1168 'reference_lum' may be higher than 'max_lum'. In that case reaching
1169 the reference white output level in image content requires the
1170 'extended_target_volume' feature support.
1171
1172 If 'max_lum' or 'reference_lum' are less than or equal to 'min_lum',
1173 the protocol error invalid_luminance is raised.
1174
1175 The minimum luminance is multiplied by 10000 to get the argument
1176 'min_lum' value and carries precision of 4 decimals. The maximum
1177 luminance and reference white luminance values are unscaled.
1178
1179 If the primary color volume luminance range and the reference white
1180 luminance level have already been set on this object, the protocol error
1181 already_set is raised.
1182
1183 This request can be used if the compositor advertises
1184 wp_color_manager_v1.feature.set_luminances. Otherwise this request
1185 raises the protocol error unsupported_feature.
1186 </description>
1187
1188 <arg name="min_lum" type="uint"
1189 summary="minimum luminance (cd/m²) * 10000"/>
1190 <arg name="max_lum" type="uint"
1191 summary="maximum luminance (cd/m²)"/>
1192 <arg name="reference_lum" type="uint"
1193 summary="reference white luminance (cd/m²)"/>
1194 </request>
1195
1196 <request name="set_mastering_display_primaries">
1197 <description summary="mastering display primaries as chromaticity coordinates">
1198 Provides the color primaries and white point of the mastering display
1199 using CIE 1931 xy chromaticity coordinates. This is compatible with the
1200 SMPTE ST 2086 definition of HDR static metadata.
1201
1202 The mastering display primaries and mastering display luminances define
1203 the target color volume.
1204
1205 If mastering display primaries are not explicitly set, the target color
1206 volume is assumed to have the same primaries as the primary color volume.
1207
1208 The target color volume is defined by all tristimulus values between 0.0
1209 and 1.0 (inclusive) of the color space defined by the given mastering
1210 display primaries and white point. The colorimetry is identical between
1211 the container color space and the mastering display color space,
1212 including that no chromatic adaptation is applied even if the white
1213 points differ.
1214
1215 The target color volume can exceed the primary color volume to allow for
1216 a greater color volume with an existing color space definition (for
1217 example scRGB). It can be smaller than the primary color volume to
1218 minimize gamut and tone mapping distances for big color spaces (HDR
1219 metadata).
1220
1221 To make use of the entire target color volume a suitable pixel format
1222 has to be chosen (e.g. floating point to exceed the primary color
1223 volume, or abusing limited quantization range as with xvYCC).
1224
1225 Each coordinate value is multiplied by 1 million to get the argument
1226 value to carry precision of 6 decimals.
1227
1228 If mastering display primaries have already been set on this object, the
1229 protocol error already_set is raised.
1230
1231 This request can be used if the compositor advertises
1232 wp_color_manager_v1.feature.set_mastering_display_primaries. Otherwise
1233 this request raises the protocol error unsupported_feature. The
1234 advertisement implies support only for target color volumes fully
1235 contained within the primary color volume.
1236
1237 If a compositor additionally supports target color volume exceeding the
1238 primary color volume, it must advertise
1239 wp_color_manager_v1.feature.extended_target_volume. If a client uses
1240 target color volume exceeding the primary color volume and the
1241 compositor does not support it, the result is implementation defined.
1242 Compositors are recommended to detect this case and fail the image
1243 description gracefully, but it may as well result in color artifacts.
1244 </description>
1245
1246 <arg name="r_x" type="int" summary="Red x * 1M"/>
1247 <arg name="r_y" type="int" summary="Red y * 1M"/>
1248 <arg name="g_x" type="int" summary="Green x * 1M"/>
1249 <arg name="g_y" type="int" summary="Green y * 1M"/>
1250 <arg name="b_x" type="int" summary="Blue x * 1M"/>
1251 <arg name="b_y" type="int" summary="Blue y * 1M"/>
1252 <arg name="w_x" type="int" summary="White x * 1M"/>
1253 <arg name="w_y" type="int" summary="White y * 1M"/>
1254 </request>
1255
1256 <request name="set_mastering_luminance">
1257 <description summary="display mastering luminance range">
1258 Sets the luminance range that was used during the content mastering
1259 process as the minimum and maximum absolute luminance L. These values
1260 include the minimum display emission and ambient flare luminances,
1261 assumed to be optically additive and have the chromaticity of the
1262 primary color volume white point. This should be
1263 compatible with the SMPTE ST 2086 definition of HDR static metadata.
1264
1265 The mastering display primaries and mastering display luminances define
1266 the target color volume.
1267
1268 If mastering luminances are not explicitly set, the target color volume
1269 is assumed to have the same min and max luminances as the primary color
1270 volume.
1271
1272 If max L is less than or equal to min L, the protocol error
1273 invalid_luminance is raised.
1274
1275 Min L value is multiplied by 10000 to get the argument min_lum value
1276 and carry precision of 4 decimals. Max L value is unscaled for max_lum.
1277
1278 This request can be used if the compositor advertises
1279 wp_color_manager_v1.feature.set_mastering_display_primaries. Otherwise
1280 this request raises the protocol error unsupported_feature. The
1281 advertisement implies support only for target color volumes fully
1282 contained within the primary color volume.
1283
1284 If a compositor additionally supports target color volume exceeding the
1285 primary color volume, it must advertise
1286 wp_color_manager_v1.feature.extended_target_volume. If a client uses
1287 target color volume exceeding the primary color volume and the
1288 compositor does not support it, the result is implementation defined.
1289 Compositors are recommended to detect this case and fail the image
1290 description gracefully, but it may as well result in color artifacts.
1291 </description>
1292
1293 <arg name="min_lum" type="uint" summary="min L (cd/m²) * 10000"/>
1294 <arg name="max_lum" type="uint" summary="max L (cd/m²)"/>
1295 </request>
1296
1297 <request name="set_max_cll">
1298 <description summary="maximum content light level">
1299 Sets the maximum content light level (max_cll) as defined by CTA-861-H.
1300
1301 max_cll is undefined by default.
1302 </description>
1303
1304 <arg name="max_cll" type="uint" summary="Maximum content light level (cd/m²)"/>
1305 </request>
1306
1307 <request name="set_max_fall">
1308 <description summary="maximum frame-average light level">
1309 Sets the maximum frame-average light level (max_fall) as defined by
1310 CTA-861-H.
1311
1312 max_fall is undefined by default.
1313 </description>
1314
1315 <arg name="max_fall" type="uint" summary="Maximum frame-average light level (cd/m²)"/>
1316 </request>
1317 </interface>
1318
1319 <interface name="wp_image_description_v1" version="1">
1320 <description summary="Colorimetric image description">
1321 An image description carries information about the color encoding used on
1322 a surface when attached to a wl_surface via
1323 wp_color_management_surface_v1.set_image_description. A compositor can use
1324 this information to decode pixel values into colorimetrically meaningful
1325 quantities.
1326
1327 Note, that the wp_image_description_v1 object is not ready to be used
1328 immediately after creation. The object eventually delivers either the
1329 'ready' or the 'failed' event, specified in all requests creating it. The
1330 object is deemed "ready" after receiving the 'ready' event.
1331
1332 An object which is not ready is illegal to use, it can only be destroyed.
1333 Any other request in this interface shall result in the 'not_ready'
1334 protocol error. Attempts to use an object which is not ready through other
1335 interfaces shall raise protocol errors defined there.
1336
1337 Once created and regardless of how it was created, a
1338 wp_image_description_v1 object always refers to one fixed image
1339 description. It cannot change after creation.
1340 </description>
1341
1342 <request name="destroy" type="destructor">
1343 <description summary="destroy the image description">
1344 Destroy this object. It is safe to destroy an object which is not ready.
1345
1346 Destroying a wp_image_description_v1 object has no side-effects, not
1347 even if a wp_color_management_surface_v1.set_image_description has not
1348 yet been followed by a wl_surface.commit.
1349 </description>
1350 </request>
1351
1352 <enum name="error">
1353 <description summary="protocol errors"/>
1354
1355 <entry name="not_ready" value="0"
1356 summary="attempted to use an object which is not ready"/>
1357 <entry name="no_information" value="1"
1358 summary="get_information not allowed"/>
1359 </enum>
1360
1361 <enum name="cause">
1362 <description summary="generic reason for failure"/>
1363
1364 <entry name="low_version" value="0"
1365 summary="interface version too low"/>
1366 <entry name="unsupported" value="1"
1367 summary="unsupported image description data"/>
1368 <entry name="operating_system" value="2"
1369 summary="error independent of the client"/>
1370 <entry name="no_output" value="3"
1371 summary="the relevant output no longer exists"/>
1372 </enum>
1373
1374 <event name="failed">
1375 <description summary="graceful error on creating the image description">
1376 If creating a wp_image_description_v1 object fails for a reason that is
1377 not defined as a protocol error, this event is sent.
1378
1379 The requests that create image description objects define whether and
1380 when this can occur. Only such creation requests can trigger this event.
1381 This event cannot be triggered after the image description was
1382 successfully formed.
1383
1384 Once this event has been sent, the wp_image_description_v1 object will
1385 never become ready and it can only be destroyed.
1386 </description>
1387
1388 <arg name="cause" type="uint" enum="cause"
1389 summary="generic reason"/>
1390 <arg name="msg" type="string"
1391 summary="ad hoc human-readable explanation"/>
1392 </event>
1393
1394 <event name="ready">
1395 <description summary="indication that the object is ready to be used">
1396 Once this event has been sent, the wp_image_description_v1 object is
1397 deemed "ready". Ready objects can be used to send requests and can be
1398 used through other interfaces.
1399
1400 Every ready wp_image_description_v1 protocol object refers to an
1401 underlying image description record in the compositor. Multiple protocol
1402 objects may end up referring to the same record. Clients may identify
1403 these "copies" by comparing their id numbers: if the numbers from two
1404 protocol objects are identical, the protocol objects refer to the same
1405 image description record. Two different image description records
1406 cannot have the same id number simultaneously. The id number does not
1407 change during the lifetime of the image description record.
1408
1409 The id number is valid only as long as the protocol object is alive. If
1410 all protocol objects referring to the same image description record are
1411 destroyed, the id number may be recycled for a different image
1412 description record.
1413
1414 Image description id number is not a protocol object id. Zero is
1415 reserved as an invalid id number. It shall not be possible for a client
1416 to refer to an image description by its id number in protocol. The id
1417 numbers might not be portable between Wayland connections. A compositor
1418 shall not send an invalid id number.
1419
1420 This identity allows clients to de-duplicate image description records
1421 and avoid get_information request if they already have the image
1422 description information.
1423 </description>
1424
1425 <arg name="identity" type="uint" summary="image description id number"/>
1426 </event>
1427
1428 <request name="get_information">
1429 <description summary="get information about the image description">
1430 Creates a wp_image_description_info_v1 object which delivers the
1431 information that makes up the image description.
1432
1433 Not all image description protocol objects allow get_information
1434 request. Whether it is allowed or not is defined by the request that
1435 created the object. If get_information is not allowed, the protocol
1436 error no_information is raised.
1437 </description>
1438
1439 <arg name="information"
1440 type="new_id" interface="wp_image_description_info_v1"/>
1441 </request>
1442 </interface>
1443
1444 <interface name="wp_image_description_info_v1" version="1">
1445 <description summary="Colorimetric image description information">
1446 Sends all matching events describing an image description object exactly
1447 once and finally sends the 'done' event.
1448
1449 This means
1450 - if the image description is parametric, it must send
1451 - primaries
1452 - named_primaries, if applicable
1453 - at least one of tf_power and tf_named, as applicable
1454 - luminances
1455 - target_primaries
1456 - target_luminance
1457 - if the image description is parametric, it may send, if applicable,
1458 - target_max_cll
1459 - target_max_fall
1460 - if the image description contains an ICC profile, it must send the
1461 icc_file event
1462
1463 Once a wp_image_description_info_v1 object has delivered a 'done' event it
1464 is automatically destroyed.
1465
1466 Every wp_image_description_info_v1 created from the same
1467 wp_image_description_v1 shall always return the exact same data.
1468 </description>
1469
1470 <event name="done" type="destructor">
1471 <description summary="end of information">
1472 Signals the end of information events and destroys the object.
1473 </description>
1474 </event>
1475
1476 <event name="icc_file">
1477 <description summary="ICC profile matching the image description">
1478 The icc argument provides a file descriptor to the client which may be
1479 memory-mapped to provide the ICC profile matching the image description.
1480 The fd is read-only, and if mapped then it must be mapped with
1481 MAP_PRIVATE by the client.
1482
1483 The ICC profile version and other details are determined by the
1484 compositor. There is no provision for a client to ask for a specific
1485 kind of a profile.
1486 </description>
1487
1488 <arg name="icc" type="fd" summary="ICC profile file descriptor"/>
1489 <arg name="icc_size" type="uint" summary="ICC profile size, in bytes"/>
1490 <!-- Offset always 0, compositor must not expose unnecessary data. -->
1491 </event>
1492
1493 <event name="primaries">
1494 <description summary="primaries as chromaticity coordinates">
1495 Delivers the primary color volume primaries and white point using CIE
1496 1931 xy chromaticity coordinates.
1497
1498 Each coordinate value is multiplied by 1 million to get the argument
1499 value to carry precision of 6 decimals.
1500 </description>
1501
1502 <arg name="r_x" type="int" summary="Red x * 1M"/>
1503 <arg name="r_y" type="int" summary="Red y * 1M"/>
1504 <arg name="g_x" type="int" summary="Green x * 1M"/>
1505 <arg name="g_y" type="int" summary="Green y * 1M"/>
1506 <arg name="b_x" type="int" summary="Blue x * 1M"/>
1507 <arg name="b_y" type="int" summary="Blue y * 1M"/>
1508 <arg name="w_x" type="int" summary="White x * 1M"/>
1509 <arg name="w_y" type="int" summary="White y * 1M"/>
1510 </event>
1511
1512 <event name="primaries_named">
1513 <description summary="named primaries">
1514 Delivers the primary color volume primaries and white point using an
1515 explicitly enumerated named set.
1516 </description>
1517
1518 <arg name="primaries" type="uint" enum="wp_color_manager_v1.primaries"
1519 summary="named primaries"/>
1520 </event>
1521
1522 <event name="tf_power">
1523 <description summary="transfer characteristic as a power curve">
1524 The color component transfer characteristic of this image description is
1525 a pure power curve. This event provides the exponent of the power
1526 function. This curve represents the conversion from electrical to
1527 optical pixel or color values.
1528
1529 The curve exponent has been multiplied by 10000 to get the argument eexp
1530 value to carry the precision of 4 decimals.
1531 </description>
1532
1533 <arg name="eexp" type="uint" summary="the exponent * 10000"/>
1534 </event>
1535
1536 <event name="tf_named">
1537 <description summary="named transfer characteristic">
1538 Delivers the transfer characteristic using an explicitly enumerated
1539 named function.
1540 </description>
1541
1542 <arg name="tf" type="uint" enum="wp_color_manager_v1.transfer_function"
1543 summary="named transfer function"/>
1544 </event>
1545
1546 <event name="luminances">
1547 <description summary="primary color volume luminance range and reference white">
1548 Delivers the primary color volume luminance range and the reference
1549 white luminance level. These values include the minimum display emission
1550 and ambient flare luminances, assumed to be optically additive and have
1551 the chromaticity of the primary color volume white point.
1552
1553 The minimum luminance is multiplied by 10000 to get the argument
1554 'min_lum' value and carries precision of 4 decimals. The maximum
1555 luminance and reference white luminance values are unscaled.
1556 </description>
1557
1558 <arg name="min_lum" type="uint"
1559 summary="minimum luminance (cd/m²) * 10000"/>
1560 <arg name="max_lum" type="uint"
1561 summary="maximum luminance (cd/m²)"/>
1562 <arg name="reference_lum" type="uint"
1563 summary="reference white luminance (cd/m²)"/>
1564 </event>
1565
1566 <event name="target_primaries">
1567 <description summary="target primaries as chromaticity coordinates">
1568 Provides the color primaries and white point of the target color volume
1569 using CIE 1931 xy chromaticity coordinates. This is compatible with the
1570 SMPTE ST 2086 definition of HDR static metadata for mastering displays.
1571
1572 While primary color volume is about how color is encoded, the target
1573 color volume is the actually displayable color volume. If target color
1574 volume is equal to the primary color volume, then this event is not
1575 sent.
1576
1577 Each coordinate value is multiplied by 1 million to get the argument
1578 value to carry precision of 6 decimals.
1579 </description>
1580
1581 <arg name="r_x" type="int" summary="Red x * 1M"/>
1582 <arg name="r_y" type="int" summary="Red y * 1M"/>
1583 <arg name="g_x" type="int" summary="Green x * 1M"/>
1584 <arg name="g_y" type="int" summary="Green y * 1M"/>
1585 <arg name="b_x" type="int" summary="Blue x * 1M"/>
1586 <arg name="b_y" type="int" summary="Blue y * 1M"/>
1587 <arg name="w_x" type="int" summary="White x * 1M"/>
1588 <arg name="w_y" type="int" summary="White y * 1M"/>
1589 </event>
1590
1591 <event name="target_luminance">
1592 <description summary="target luminance range">
1593 Provides the luminance range that the image description is targeting as
1594 the minimum and maximum absolute luminance L. These values include the
1595 minimum display emission and ambient flare luminances, assumed to be
1596 optically additive and have the chromaticity of the primary color
1597 volume white point. This should be compatible with the SMPTE ST 2086
1598 definition of HDR static metadata.
1599
1600 This luminance range is only theoretical and may not correspond to the
1601 luminance of light emitted on an actual display.
1602
1603 Min L value is multiplied by 10000 to get the argument min_lum value and
1604 carry precision of 4 decimals. Max L value is unscaled for max_lum.
1605 </description>
1606
1607 <arg name="min_lum" type="uint" summary="min L (cd/m²) * 10000"/>
1608 <arg name="max_lum" type="uint" summary="max L (cd/m²)"/>
1609 </event>
1610
1611 <event name="target_max_cll">
1612 <description summary="target maximum content light level">
1613 Provides the targeted max_cll of the image description. max_cll is
1614 defined by CTA-861-H.
1615
1616 This luminance is only theoretical and may not correspond to the
1617 luminance of light emitted on an actual display.
1618 </description>
1619
1620 <arg name="max_cll" type="uint"
1621 summary="Maximum content light-level (cd/m²)"/>
1622 </event>
1623
1624 <event name="target_max_fall">
1625 <description summary="target maximum frame-average light level">
1626 Provides the targeted max_fall of the image description. max_fall is
1627 defined by CTA-861-H.
1628
1629 This luminance is only theoretical and may not correspond to the
1630 luminance of light emitted on an actual display.
1631 </description>
1632
1633 <arg name="max_fall" type="uint"
1634 summary="Maximum frame-average light level (cd/m²)"/>
1635 </event>
1636 </interface>
1637 </protocol>