wp_color_management_surface_feedback_v1¤
wayland.wp_color_management_surface_feedback_v1 ¤
Color management extension to a surface
A wp_color_management_surface_feedback_v1 allows the client to get the preferred image description of a surface.
If the wl_surface associated with this object is destroyed, the wp_color_management_surface_feedback_v1 object becomes inert.
Methods:
-
destroy
–Destroy the color management interface for a surface
-
get_preferred
–Get the preferred image description
-
get_preferred_parametric
–Get the preferred image description
-
on_preferred_changed
–The preferred image description changed.
error ¤
Protocol errors
-
inert
–Forbidden request on inert object -
unsupported_feature
–Attempted to use an unsupported feature
events
preferred_changed ¤
The preferred image description changed
The preferred image description is the one which likely has the most performance and/or quality benefits for the compositor if used by the client for its wl_surface contents. This event is sent whenever the compositor changes the wl_surface's preferred image description.
This event sends the identity of the new preferred state as the argument, so clients who are aware of the image description already can reuse it. Otherwise, if the client client wants to know what the preferred image description is, it shall use the get_preferred request.
The preferred image description is not automatically used for anything. It is only a hint, and clients may set any valid image description with set_image_description, but there might be performance and color accuracy improvements by providing the wl_surface contents in the preferred image description. Therefore clients that can, should render according to the preferred image description
Parameters:
destroy ¤
destroy() -> None
Destroy the color management interface for a surface
Destroy the wp_color_management_surface_feedback_v1 object.
get_preferred ¤
get_preferred() -> wp_image_description_v1
Get the preferred image description
If this protocol object is inert, the protocol error inert is raised.
The preferred image description represents the compositor's preferred color encoding for this wl_surface at the current time. There might be performance and power advantages, as well as improved color reproduction, if the image description of a content update matches the preferred image description.
This creates a new wp_image_description_v1 object for the currently preferred image description for the wl_surface. The client should stop using and destroy the image descriptions created by earlier invocations of this request for the associated wl_surface. This request is usually sent as a reaction to the preferred_changed event or when creating a wp_color_management_surface_feedback_v1 object if the client is capable of adapting to image descriptions.
The created wp_image_description_v1 object preserves the preferred image description of the wl_surface from the time the object was created.
The resulting image description object allows get_information request.
If the image description is parametric, the client should set it on its wl_surface only if the image description is an exact match with the client content. Particularly if everything else matches, but the target color volume is greater than what the client needs, the client should create its own parameric image description with its exact parameters.
If the interface version is inadequate for the preferred image description, meaning that the client does not support all the events needed to deliver the crucial information, the resulting image description object shall immediately deliver the wp_image_description_v1.failed event with the low_version cause, otherwise the object shall immediately deliver the ready event.
Returns:
-
wp_image_description_v1
(wp_image_description_v1
) –The created object
get_preferred_parametric ¤
get_preferred_parametric() -> wp_image_description_v1
Get the preferred image description
The same description as for get_preferred applies, except the returned image description is guaranteed to be parametric. This is meant for clients that can only deal with parametric image descriptions.
If the compositor doesn't support parametric image descriptions, the unsupported_feature error is emitted.
Returns:
-
wp_image_description_v1
(wp_image_description_v1
) –The created object
on_preferred_changed ¤
on_preferred_changed(identity: int) -> None
The preferred image description changed.
Override to handle wayland.wp_color_management_surface_feedback_v1.events.preferred_changed
.