1
0

color-management-v1.xml 77 KB

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