Chromium color management
- external
This protocol specifies a way for a client to set the color space and HDR metadata of a surface and to get information about the color spaces and HDR capabilities of outputs.
This protocol is based on a proposed upstream protocol, which we will migrate to once it is approved. It may diverge from the proposed upstream protocol over the course of our development.
zcr_color_manager_v1
A global interface used for getting color management surface and color management output objects as well as creating color space objects from ICC profiles, parameters, or enumerated names.
create_color_space_from_icc(id: new_id<zcr_color_space_creator_v1>, icc: fd)
Argument | Type | Description |
---|---|---|
id | new_id<zcr_color_space_creator_v1> | |
icc | fd |
Create a color space object from an ICC profile. This request returns a zcr_color_space_creator_v1 object which either returns an error or the successfully created zcr_color_space_v1 object.
The description of the color space to create is sent in the form of an ICC profile as a file descriptor in the argument icc.
The fd must be seekable and the maximum size of the ICC profile is 4 MB. Violating these requirements will raise an icc_fd protocol error. A compositor must not modify the contents of the file, and the fd may be sealed for writes and size changes.
The file contents must represent a valid ICC profile. The ICC profile version must be 2 or 4, it must be a 3 channel profile and the class must be 'input', 'output', 'abstract' or 'display'. Violating these requirements will not result in a protocol error but raise the zcr_color_space_creator_v1.error event.
See the zcr_color_space_v1 and zcr_color_space_creator_v1 interface for more details about the created object.
See the specification from International Color Consortium for more details about ICC profiles, also known as ISO 15076-1:2010.
create_color_space_from_names(id: new_id<zcr_color_space_creator_v1>, eotf: uint<zcr_color_manager_v1.eotf_names>, chromaticity: uint<zcr_color_manager_v1.chromaticity_names>, whitepoint: uint<zcr_color_manager_v1.whitepoint_names>)
Argument | Type | Description |
---|---|---|
id | new_id<zcr_color_space_creator_v1> | |
eotf | uint<zcr_color_manager_v1.eotf_names> | EOTF |
chromaticity | uint<zcr_color_manager_v1.chromaticity_names> | chromaticity |
whitepoint | uint<zcr_color_manager_v1.whitepoint_names> | whitepoint |
[Deprecated] Create a color space object from well-known names. This request returns a zcr_color_space_creator_v1 object which either returns an error or the successfully created zcr_color_space_v1 object.
EOTF, chromaticity and whitepoint must not be unknown. Otherwise, or if a given value is not listed in the enumeration, the protocol error bad_enum is raised.
See the zcr_color_space_v1 and zcr_color_space_creator_v1 interface for more details about the created object. Use create_color_space_from_complete_names instead.
create_color_space_from_params(id: new_id<zcr_color_space_creator_v1>, eotf: uint<zcr_color_manager_v1.eotf_names>, primary_r_x: uint, primary_r_y: uint, primary_g_x: uint, primary_g_y: uint, primary_b_x: uint, primary_b_y: uint, white_point_x: uint, white_point_y: uint)
Argument | Type | Description |
---|---|---|
id | new_id<zcr_color_space_creator_v1> | |
eotf | uint<zcr_color_manager_v1.eotf_names> | EOTF |
primary_r_x | uint | red primary X * 10000 |
primary_r_y | uint | red primary Y * 10000 |
primary_g_x | uint | green primary X * 10000 |
primary_g_y | uint | green primary Y * 10000 |
primary_b_x | uint | blue primary X * 10000 |
primary_b_y | uint | blue primary Y * 10000 |
white_point_x | uint | white point X * 10000 |
white_point_y | uint | white point Y * 10000 |
[Deprecated] Create a color space object from parameters. This request returns a zcr_color_space_creator_v1 object which either returns an error or the successfully created zcr_color_space_v1 object.
EOTF must not be unknown. Otherwise, or if a given EOTF is not listed in the enumeration, the protocol error bad_enum is raised.
The white point must be inside the triangle created by the red, green and blue primaries. Otherwise the bad_param protocol error is raised.
All the chromaticity values are multiplied by 10000 to produce the integers carried by the protocol.
See the zcr_color_space_v1 and zcr_color_space_creator_v1 interface for more details about the created object. Use create_color_space_from_complete_params instead.
get_color_management_output(id: new_id<zcr_color_management_output_v1>, output: object<wl_output>)
Argument | Type | Description |
---|---|---|
id | new_id<zcr_color_management_output_v1> | |
output | object<wl_output> |
This creates a new zcr_color_management_output_v1 object for the given wl_output.
See the zcr_color_management_output_v1 interface for more details.
get_color_management_surface(id: new_id<zcr_color_management_surface_v1>, surface: object<wl_surface>)
Argument | Type | Description |
---|---|---|
id | new_id<zcr_color_management_surface_v1> | |
surface | object<wl_surface> |
This creates a new color zcr_color_management_surface_v1 object for the given wl_surface.
See the zcr_color_management_surface_v1 interface for more details.
destroy()
Destroy the zcr_color_manager_v1 object. This does not affect any other objects in any way.
create_color_space_from_complete_names(id: new_id<zcr_color_space_creator_v1>, eotf: uint<zcr_color_manager_v1.eotf_names>, chromaticity: uint<zcr_color_manager_v1.chromaticity_names>, whitepoint: uint<zcr_color_manager_v1.whitepoint_names>, matrix: uint<zcr_color_manager_v1.matrix_names>, range: uint<zcr_color_manager_v1.range_names>)
Argument | Type | Description |
---|---|---|
id | new_id<zcr_color_space_creator_v1> | |
eotf | uint<zcr_color_manager_v1.eotf_names> | EOTF |
chromaticity | uint<zcr_color_manager_v1.chromaticity_names> | chromaticity |
whitepoint | uint<zcr_color_manager_v1.whitepoint_names> | whitepoint |
matrix | uint<zcr_color_manager_v1.matrix_names> | color matrix |
range | uint<zcr_color_manager_v1.range_names> | color range |
Create a color space object from well-known names. This request returns a zcr_color_space_creator_v1 object which either returns an error or the successfully created zcr_color_space_v1 object.
EOTF, chromaticity and whitepoint must not be unknown. Otherwise, or if a given value is not listed in the enumeration, the protocol error bad_enum is raised.
This request additionally includes matrix and range information.
See the zcr_color_space_v1 and zcr_color_space_creator_v1 interface for more details about the created object.
create_color_space_from_complete_params(id: new_id<zcr_color_space_creator_v1>, eotf: uint<zcr_color_manager_v1.eotf_names>, matrix: uint<zcr_color_manager_v1.matrix_names>, range: uint<zcr_color_manager_v1.range_names>, primary_r_x: uint, primary_r_y: uint, primary_g_x: uint, primary_g_y: uint, primary_b_x: uint, primary_b_y: uint, white_point_x: uint, white_point_y: uint)
Argument | Type | Description |
---|---|---|
id | new_id<zcr_color_space_creator_v1> | |
eotf | uint<zcr_color_manager_v1.eotf_names> | EOTF |
matrix | uint<zcr_color_manager_v1.matrix_names> | Color matrix |
range | uint<zcr_color_manager_v1.range_names> | Color range |
primary_r_x | uint | red primary X * 10000 |
primary_r_y | uint | red primary Y * 10000 |
primary_g_x | uint | green primary X * 10000 |
primary_g_y | uint | green primary Y * 10000 |
primary_b_x | uint | blue primary X * 10000 |
primary_b_y | uint | blue primary Y * 10000 |
white_point_x | uint | white point X * 10000 |
white_point_y | uint | white point Y * 10000 |
Create a color space object from parameters. This request returns a zcr_color_space_creator_v1 object which either returns an error or the successfully created zcr_color_space_v1 object.
EOTF must not be unknown. Otherwise, or if a given EOTF is not listed in the enumeration, the protocol error bad_enum is raised.
The white point must be inside the triangle created by the red, green and blue primaries. Otherwise the bad_param protocol error is raised.
All the chromaticity values are multiplied by 10000 to produce the integers carried by the protocol.
This request additionally includes matrix and range information.
See the zcr_color_space_v1 and zcr_color_space_creator_v1 interface for more details about the created object.
eotf_names { unknown, linear, srgb, bt2087, adobergb, pq, hlg, bt709, extendedsrgb10, smpte170m, smpte240m, smptest428_1, log, log_sqrt, iec61966_2_4, bt1361_ecg, bt2020_10, bt2020_12, scrgb_linear_80_nits, gamma18, gamma28, srgb_hdr }
Argument | Value | Description |
---|---|---|
unknown | 0 | unknown EOTF |
linear | 1 | Linear transfer function |
srgb | 2 | sRGB transfer function |
bt2087 | 3 | BT.2087 transfer function |
adobergb | 4 | AdobeRGB transfer function |
pq | 5 | Perceptual quantizer / SMPTEST2084 |
hlgsince 2 | 6 | hybrid log gamma |
bt709since 2 | 7 | gamma for rec709 encoded videos |
extendedsrgb10since 2 | 8 | sRGB transfer function with headroom for HDR |
smpte170msince 5 | 9 | SMPTE240M transfer function |
smpte240msince 5 | 10 | SMPTE240M transfer function |
smptest428_1since 5 | 11 | SMPTEST428_1 transfer function |
logsince 5 | 12 | LOG transfer function |
log_sqrtsince 5 | 13 | LOG Sqrt transfer function |
iec61966_2_4since 5 | 14 | IEC61966_2_4 transfer function |
bt1361_ecgsince 5 | 15 | BT1361_ECG transfer function |
bt2020_10since 5 | 16 | BT2020_10 transfer function |
bt2020_12since 5 | 17 | BT2020_12 transfer function |
scrgb_linear_80_nitssince 5 | 18 | SCRGB Linear transfer function |
gamma18since 5 | 19 | GAMMA18 transfer function |
gamma28since 5 | 20 | GAMMA28 transfer function |
srgb_hdrsince 6 | 21 | sRGB transfer function |
Names that describe a well-known EOTF.
A compositor must support all of these based on the protocol interface version.
chromaticity_names { unknown, bt601_525_line, bt601_625_line, smpte170m, bt709, bt2020, srgb, displayp3, adobergb, wide_gamut_color_spin, bt470m, smpte240m, xyz_d50, smptest428_1, smptest431_2, film }
Argument | Value | Description |
---|---|---|
unknown | 0 | unknown chromaticity |
bt601_525_line | 1 | ITU-R BT.601 http://www.itu.int/rec/R-REC-BT.601/en |
bt601_625_line | 2 | ITU-R BT.601 http://www.itu.int/rec/R-REC-BT.601/en |
smpte170m | 3 | SMPTE 170M-1999 https://www.itu.int/rec/R-REC-BT.1700/en |
bt709 | 4 | ITU-R BT.709 https://www.itu.int/rec/R-REC-BT.709/en |
bt2020 | 5 | ITU-R BT.2020 http://www.itu.int/rec/R-REC-BT.2020/en |
srgb | 6 | IEC/4WD 61966-2-1: sRGB https://webstore.iec.ch/publication/6169 |
displayp3 | 7 | Display P3 https://developer.apple.com/reference/coregraphics/cgcolorspace/1408916-displayp3 |
adobergb | 8 | Adobe RGB https://www.adobe.com/digitalimag/pdfs/AdobeRGB1998.pdf |
wide_gamut_color_spinsince 5 | 9 | |
bt470msince 5 | 10 | |
smpte240msince 5 | 11 | |
xyz_d50since 5 | 12 | |
smptest428_1since 5 | 13 | |
smptest431_2since 5 | 14 | |
filmsince 5 | 15 |
Names that describe well-known chromaticities.
A compositor must support all of these based on the protocol interface version.
Argument | Value | Description |
---|---|---|
unknown | 0 | unknown whitepoint |
dci | 1 | DCI whitepoint |
d50 | 2 | D50 whitepoint |
d65 | 3 | D65 whitepoint |
Names that describe well-known whitepoints.
A compositor must support all of these based on the protocol interface version.
matrix_names { unknown, rgb, bt709, bt2020_ncl, bt2020_cl, fcc, smpte170m, smpte240m, ydzdx, bt470bg, gbr, ycocg }
Argument | Value | Description |
---|---|---|
unknown | 0 | Unknown range |
rgb | 1 | RGB matrix |
bt709 | 2 | BT709 matrix |
bt2020_ncl | 3 | BT2020_NCL matrix |
bt2020_cl | 4 | BT2020_CL matrix |
fcc | 5 | FCC matrix |
smpte170m | 6 | SMPTE170M matrix |
smpte240m | 7 | SMPTE240M matrix |
ydzdxsince 5 | 8 | YDZDX matrix |
bt470bgsince 5 | 9 | BT470BG matrix |
gbrsince 5 | 10 | GBR matrix |
ycocgsince 5 | 11 | YCOCG matrix |
Names that describe typical ColorSpace Matrix IDs
zcr_color_management_output_v1
A zcr_color_management_output_v1 describes the color properties of an output.
When zcr_color_management_output_v1 object is created, it will send its initial events followed by a wl_output.done event. When creating wl_output and its extension objects, use a final wl_display.sync to guarantee that all output events have been received across all extensions.
If the wl_output associated with the zcr_color_management_output_v1 is destroyed, the zcr_color_management_output_v1 object becomes inert.
get_color_space(id: new_id<zcr_color_space_v1>)
Argument | Type | Description |
---|---|---|
id | new_id<zcr_color_space_v1> |
This creates a new zcr_color_space_v1 object for the current color space of the output. There always is exactly one color space active for an output so the client should destroy the color space created by earlier invocations of this request. This request is usually sent as a reaction to the color_space_changed event or when creating a zcr_color_management_output_v1 object.
The created zcr_color_space_v1 object preserves the color space of the output from the time the object was created.
The resulting color space object allows get_information request.
See the zcr_color_space_v1 interface for more details.
destroy()
Destroy the color zcr_color_management_output_v1 object. This does not affect any remaining protocol objects.
color_space_changed()
The color_space_changed event is sent whenever the color space of the output changed, followed by one wl_output.done event common to output events across all extensions.
This is not an initial event.
extended_dynamic_range(value: uint)
Argument | Type | Description |
---|---|---|
value | uint | EDR value * 1000 |
This is both an initial event and sent whenever the value changed. When the value changed, this event is followed by one wl_output.done event common to output events across all extensions.
The extended dynamic range value describes how much dynamic range is available relative to the SDR maximum white. EDR value is proportional to luminance, and the luminance of black is used as the zero level. A value of 1.0 means that the the display can not display anything brighter than SDR maximum white. A value of 3.0 means that the SDR maximum white is at one third of the highest luminance the display can produce.
The absolute luminance of the SDR maximum white depends on the monitor capabilities, the viewing conditions and the viewer personal preferences. A such, it cannot be given a single value in cd/m². Compositors using HDR video modes should allow users to control the the SDR maximum white level which the output EDR value is calculated from.
The SDR maximum white is a relative reference luminance that allows to tone-map content from different dynamic ranges into a single common dynamic range for display.
The EDR value is multiplied by 1000 to produce the integer value carried by the protocol.
zcr_color_management_surface_v1
A zcr_color_management_surface_v1 allows the client to set the color space and HDR properties of a surface.
If the wl_surface associated with the zcr_color_management_surface_v1 is destroyed, the zcr_color_management_surface_v1 object becomes inert.
set_alpha_mode(alpha_mode: uint<zcr_color_management_surface_v1.alpha_mode>)
Argument | Type | Description |
---|---|---|
alpha_mode | uint<zcr_color_management_surface_v1.alpha_mode> | alpha mode |
Assuming an alpha channel exists, it is always linear. The alpha mode determines whether the color channels include alpha pre-multiplied or not. Using straight alpha might have performance benefits.
Alpha mode is double buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called.
By default, a surface is assumed to have pre-multiplied alpha.
set_extended_dynamic_range(value: uint)
Argument | Type | Description |
---|---|---|
value | uint | EDR value * 1000 |
Set the extended dynamic range (EDR) value for the underlying surface. The EDR value is double buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called.
The EDR value describes how much dynamic range is encoded relative to the SDR maximum white. EDR value is proportional to luminance, using the luminance of black as the zero level. A value of 1.0 means that the SDR maximum white is the highest possible luminance of the surface. A value of 3.0 means that the SDR maximum white is one third of the highest possible luminance of the surface.
The color space attached to the surface can make the code values in the buffer non-linear in regards to the luminance. The code value to produce a third of the luminance of the biggest code value therefore might not be one third of the biggest code value.
For the definition of the SDR maximum white on an output, see zcr_color_management_output_v1.extended_dynamic_range. Content producers are free to choose their SDR maximum white level. How it shall be displayed depends on the monitor capabilities and the output EDR value.
By default the EDR value is 1.0. The compositor will tone map the image to match the EDR of each output the surface is shown on. The aim for the EDR-EDR mapping is to produce a relative luminance mapping that looks equally good regardless of the viewing conditions and the monitor capabilities, assuming the output EDR value was tuned to the output capabilities and the viewing environment. There might be performance and image quality benefits from providing content readily tone mapped to the EDR value of the output the surface is shown on.
The EDR value is multiplied by 1000 to produce the integer value carried by the protocol.
set_color_space(color_space: object<zcr_color_space_v1>, render_intent: uint<zcr_color_management_surface_v1.render_intent>)
Argument | Type | Description |
---|---|---|
color_space | object<zcr_color_space_v1> | |
render_intent | uint<zcr_color_management_surface_v1.render_intent> | render intent |
Set the color space of the underlying surface. The color space and render intent are double buffered, and will be applied at the time wl_surface.commit of the corresponding wl_surface is called.
The render intent gives the compositor a hint what to optimize for in color space transformations.
By default, a surface is assumed to have the sRGB color space and an arbitrary render intent.
If the color space of the surface matches the color space of an output it is shown on the performance and color accuracy might improve. To find those color spaces the client can listen to the preferred_color_space or the wl_surface.enter/leave events. This improvement may require using the color space object created by zcr_color_management_output_v1.get_color_space.
set_default_color_space()
This request sets the surface color space to the defaults, see set_color_space. The setting will be applied at the time wl_surface.commit of the corresponding wl_surface is called.
destroy()
Destroy the zcr_color_management_surface_v1 object.
When the last zcr_color_management_surface_v1 object for a wl_surface is destroyed, the destruction will pend unsetting the wl_surface's color space, render intent and alpha mode similar to set_color_space will pend a set.
The preferred_color_space event is sent when the compositor determines or switches the output that implies the preferred color space. The preferred color space is the one which likely has the most performance and quality benefits if used by a client for its surface contents.
The event does not carry a zcr_color_space_v1 but a wl_output object. The concrete zcr_color_space_v1 can be created by calling zcr_color_management_output_v1.get_color_space on the output and listening to zcr_color_management_output_v1.color_space_changed events.
As clients may bind to the same global wl_output multiple times, this event is sent for each bound instance that matches the preferred color space output. If a client has not bound to the right wl_output global at all, this event is not sent.
This is only a hint and clients can set any valid color space with set_color_space but there might be performance and color accuracy improvements by providing the surface in the preferred color space.
render_intent { perceptual, relative, saturation, absolute, relative_bpc }
Argument | Value | Description |
---|---|---|
perceptual | 0 | perceptual |
relative | 1 | media-relative colorimetric |
saturation | 2 | saturation |
absolute | 3 | ICC-absolute colorimetric |
relative_bpc | 4 | media-relative colorimetric + black point compensation |
Rendering intent allow the client to hint at how to perform color space transformations.
See the ICC specification for more details about rendering intent.
alpha_mode { straight, premultiplied }
Argument | Value | Description |
---|---|---|
straight | 0 | alpha is independent from color channels |
premultiplied | 1 | alpha is pre-multiplied into color channels |
Specifies whether alpha is pre-multiplied into color channels or not. If pre-multiplied, the linear alpha value is already multiplied with the (non-linear) color channel code values in the color channels.
zcr_color_space_creator_v1
A zcr_color_space_creator_v1 object returns a created color space or the error which occured during creation.
Once a zcr_color_space_creator_v1 object has delivered a 'created' or 'error' event it is automatically destroyed.
created(id: new_id<zcr_color_space_v1>)
Argument | Type | Description |
---|---|---|
id | new_id<zcr_color_space_v1> |
Delivers the successfully created color space.
The resulting color space object does not allow get_information request.
error(error: uint<zcr_color_space_creator_v1.creation_error>)
Argument | Type | Description |
---|---|---|
error | uint<zcr_color_space_creator_v1.creation_error> | error bitmask |
This event is sent if the color space creation failed.
creation_error { malformed_icc, bad_icc, bad_primaries, bad_whitepoint }
Argument | Value | Description |
---|---|---|
malformed_icc | 0x1 | malformed ICC profile |
bad_icc | 0x2 | ICC profile does not meet requirements |
bad_primaries | 0x4 | bad primaries |
bad_whitepoint | 0x8 | bad whitepoint |
Bitmask of errors which occured while trying to create a color space
zcr_color_space_v1
Refers to a color space which can be attached to a surface (zcr_color_management_surface_v1.set_color_space). It may provide information like the ICC profile and the well-known names to allow clients to know the color space and do color transformations of their own.
Once created and regardless of how it was created, a zcr_color_space_v1 object always refers to one fixed color space.
The client can create a zcr_color_space_v1 object with zcr_color_manager_v1 requests or from an output by calling zcr_color_management_output_v1.get_color_space.
Other extensions may define more zcr_color_space_v1 factory interfaces. Those interfaces must explicitly specify the interface version for the object created, otherwise versioning zcr_color_space_v1 correctly becomes impossible. Using a 'new_id' argument without 'interface' attribute defined in XML forces code generators to add two explicit arguments: interface and version. Version is the explicit version number needed, and interface should be required to be "zcr_color_space_v1". The compositor supported zcr_color_space_v1 versions are defined by the advertised zcr_color_manager_v1 in wl_registry.
get_information()
As a reply to this request, the compositor will send all available information events describing this color space object and finally the 'done' event. Other extensions may define more events to be sent before 'done'.
This request is allowed only on zcr_color_space_v1 objects where the message that created the object specifies that get_information is allowed. Otherwise protocol error no_information is raised.
Every get_information request on the same object will always return the exact same data.
See zcr_color_management_output_v1.get_color_space and zcr_color_space_creator_v1.created.
destroy()
Destroy the zcr_color_space_v1 object.
Destroying the zcr_color_space_v1 which is active on a surface or an output does not change the color space of those objects.
This event may be sent only as a response to zcr_color_space_v1.get_information.
The icc argument provides a file descriptor to the client which can be memory-mapped to provide the ICC profile describing the color space. The fd must be mapped with MAP_PRIVATE and read-only by the client.
Compositors should send this event always when information is requested. ICC profiles provide the common foundation which all color managed clients may rely on.
names(eotf: uint<zcr_color_manager_v1.eotf_names>, chromaticity: uint<zcr_color_manager_v1.chromaticity_names>, whitepoint: uint<zcr_color_manager_v1.whitepoint_names>)
Argument | Type | Description |
---|---|---|
eotf | uint<zcr_color_manager_v1.eotf_names> | EOTF |
chromaticity | uint<zcr_color_manager_v1.chromaticity_names> | chromaticity |
whitepoint | uint<zcr_color_manager_v1.whitepoint_names> | whitepoint |
[Deprecated] This event may be sent only as a response to zcr_color_space_v1.get_information.
EOTF, chromaticity and whitepoint contain well-known names of those properties if available and unknown otherwise.
Compositors should not assume that all clients can understand these names. The names are provided for client convenience. If a client understands the name triplet, it may ignore other information about the color space, the ICC profile for example. Use complete_names instead.
params(eotf: uint<zcr_color_manager_v1.eotf_names>, primary_r_x: uint, primary_r_y: uint, primary_g_x: uint, primary_g_y: uint, primary_b_x: uint, primary_b_y: uint, white_point_x: uint, white_point_y: uint)
Argument | Type | Description |
---|---|---|
eotf | uint<zcr_color_manager_v1.eotf_names> | EOTF |
primary_r_x | uint | red primary X * 10000 |
primary_r_y | uint | red primary Y * 10000 |
primary_g_x | uint | green primary X * 10000 |
primary_g_y | uint | green primary Y * 10000 |
primary_b_x | uint | blue primary X * 10000 |
primary_b_y | uint | blue primary Y * 10000 |
white_point_x | uint | white point X * 10000 |
white_point_y | uint | white point Y * 10000 |
[Deprecated] This event may be sent only as a response to zcr_color_space_v1.get_information.
The RGB primary value arguments along with the whitepoint value arguments and eotf can be used to define an arbitrary or custom color space.
The eotf enum contains well known names of that property, but the compositor should not assume that all clients will understand those names. Use complete_params instead.
done()
This event may be sent only as a response to zcr_color_space_v1.get_information.
This signifies that all color space information events have been delivered for the object.
complete_names(eotf: uint<zcr_color_manager_v1.eotf_names>, chromaticity: uint<zcr_color_manager_v1.chromaticity_names>, whitepoint: uint<zcr_color_manager_v1.whitepoint_names>, matrix: uint<zcr_color_manager_v1.matrix_names>, range: uint<zcr_color_manager_v1.range_names>)
Argument | Type | Description |
---|---|---|
eotf | uint<zcr_color_manager_v1.eotf_names> | EOTF |
chromaticity | uint<zcr_color_manager_v1.chromaticity_names> | chromaticity |
whitepoint | uint<zcr_color_manager_v1.whitepoint_names> | whitepoint |
matrix | uint<zcr_color_manager_v1.matrix_names> | Color matrix |
range | uint<zcr_color_manager_v1.range_names> | Color range |
This event may be sent only as a response to zcr_color_space_v1.get_information.
EOTF, chromaticity, matrix, range and whitepoint contain well-known names of those properties if available and unknown otherwise.
Compositors should not assume that all clients can understand these names. The names are provided for client convenience. If a client understands the name triplet, it may ignore other information about the color space, the ICC profile for example.
complete_params(eotf: uint<zcr_color_manager_v1.eotf_names>, matrix: uint<zcr_color_manager_v1.matrix_names>, range: uint<zcr_color_manager_v1.range_names>, primary_r_x: uint, primary_r_y: uint, primary_g_x: uint, primary_g_y: uint, primary_b_x: uint, primary_b_y: uint, white_point_x: uint, white_point_y: uint)
Argument | Type | Description |
---|---|---|
eotf | uint<zcr_color_manager_v1.eotf_names> | EOTF |
matrix | uint<zcr_color_manager_v1.matrix_names> | Color matrix |
range | uint<zcr_color_manager_v1.range_names> | Color range |
primary_r_x | uint | red primary X * 10000 |
primary_r_y | uint | red primary Y * 10000 |
primary_g_x | uint | green primary X * 10000 |
primary_g_y | uint | green primary Y * 10000 |
primary_b_x | uint | blue primary X * 10000 |
primary_b_y | uint | blue primary Y * 10000 |
white_point_x | uint | white point X * 10000 |
white_point_y | uint | white point Y * 10000 |
This event may be sent only as a response to zcr_color_space_v1.get_information.
The RGB primary value arguments along with the whitepoint value arguments and eotf can be used to define an arbitrary or custom color space.
The eotf enum contains well known names of that property, but the compositor should not assume that all clients will understand those names.
error { no_information }
Argument | Value | Description |
---|---|---|
no_information | 0 | get_information disallowed |
Compositor Support
Copyright
Copyright 2019 Sebastian Wick Copyright 2019 Erwin Burema Copyright 2020 AMD Copyright 2020 Collabora, Ltd.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.