Commit 84c0a5f3 authored by Sebastian Wick's avatar Sebastian Wick
Browse files

color: split alpha mode into its own request



There is no need to couple it to the set_color_space request since we
get atomicity via the surface.commit mechanism.
set_extended_dynamic_range already has its own request so keep it
uniform.
Signed-off-by: Sebastian Wick's avatarSebastian Wick <sebastian@sebastianwick.net>
parent 5637d2d3
Pipeline #236071 passed with stages
in 52 seconds
......@@ -372,23 +372,19 @@
<request name="set_color_space">
<description summary="set the surface color space">
Set the color space of the underlying surface. The color space,
render intent and alpha mode are double buffered, and will be applied
at the time wl_surface.commit of the corresponding wl_surface is called.
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.
<!-- FIXME: same problem as in the render_intent enum -->
The render intent gives the compositor a hint what to optimize for in
The render intent gives the compositor a hint what to optimize for in
color space transformations.
The alpha channel is always linear. The alpha mode determines whether
the color channels include alpha pre-multiplied or not. Using straight
alpha might have performance benefits.
By default, a surface is assumed to have the sRGB color space, an
arbitrary render intent, and pre-multiplied alpha.
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
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
......@@ -396,7 +392,6 @@
</description>
<arg name="color_space" type="object" interface="zwp_color_space_v1"/>
<arg name="render_intent" type="uint" enum="render_intent" summary="render intent"/>
<arg name="alpha_mode" type="uint" enum="alpha_mode" summary="alpha mode"/>
</request>
<request name="set_default_color_space">
......@@ -407,6 +402,21 @@
</description>
</request>
<request name="set_alpha_mode">
<description summary="set the surface color space">
Set the alpha mode of the underlying surface. The alpha mode is double
buffered, and will be applied at the time wl_surface.commit of the
corresponding wl_surface is called.
The alpha channel is always linear. The alpha mode determines whether
the color channels include alpha pre-multiplied or not. Using straight
alpha might have performance benefits.
By default, a surface is assumed to have pre-multiplied alpha.
</description>
<arg name="alpha_mode" type="uint" enum="alpha_mode" summary="alpha mode"/>
</request>
<!-- TODO: HDR metadata request -->
<event name="preferred_color_space">
......@@ -438,10 +448,10 @@
<description summary="destroy the color management interface for a surface">
Destroy the zwp_color_management_surface_v1 object.
When the last zwp_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.
When the last zwp_color_management_surface_v1 object for a wl_surface is
destroyed, the destruction will pend unsetting the wl_surface's color
space, render intent, alpha mode and extended dynamic range similar to
set_color_space will pend a set.
</description>
</request>
</interface>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment