color-management-v1.xml 73 KB

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