scene: send color_management_v1 surface feedback

Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3999
This commit is contained in:
Simon Ser 2025-07-29 19:29:45 +02:00 committed by Simon Zeni
parent 26c1476827
commit 7cb3393e75
3 changed files with 84 additions and 0 deletions

View file

@ -43,6 +43,7 @@ struct wlr_scene_output_layout;
struct wlr_presentation;
struct wlr_linux_dmabuf_v1;
struct wlr_gamma_control_manager_v1;
struct wlr_color_manager_v1;
struct wlr_output_state;
typedef bool (*wlr_scene_buffer_point_accepts_input_func_t)(
@ -102,11 +103,13 @@ struct wlr_scene {
// May be NULL
struct wlr_linux_dmabuf_v1 *linux_dmabuf_v1;
struct wlr_gamma_control_manager_v1 *gamma_control_manager_v1;
struct wlr_color_manager_v1 *color_manager_v1;
struct {
struct wl_listener linux_dmabuf_v1_destroy;
struct wl_listener gamma_control_manager_v1_destroy;
struct wl_listener gamma_control_manager_v1_set_gamma;
struct wl_listener color_manager_v1_destroy;
enum wlr_scene_debug_damage_option debug_damage_option;
bool direct_scanout;
@ -366,6 +369,13 @@ void wlr_scene_set_linux_dmabuf_v1(struct wlr_scene *scene,
void wlr_scene_set_gamma_control_manager_v1(struct wlr_scene *scene,
struct wlr_gamma_control_manager_v1 *gamma_control);
/**
* Handles color_management_v1 feedback for all surfaces in the scene.
*
* Asserts that a struct wlr_color_manager_v1 hasn't already been set for the scene.
*/
void wlr_scene_set_color_manager_v1(struct wlr_scene *scene, struct wlr_color_manager_v1 *manager);
/**
* Add a node displaying nothing but its children.
*/