From c50c4fc5cc7fc4c1e8e7ecd5d21bb821d0f7cfb6 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Mon, 7 Jun 2021 18:20:45 +0200 Subject: linux-dmabuf-v1: add per-surface feedback --- include/wlr/types/wlr_linux_dmabuf_v1.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_linux_dmabuf_v1.h b/include/wlr/types/wlr_linux_dmabuf_v1.h index bbbb2772..df89a121 100644 --- a/include/wlr/types/wlr_linux_dmabuf_v1.h +++ b/include/wlr/types/wlr_linux_dmabuf_v1.h @@ -15,6 +15,8 @@ #include #include +struct wlr_surface; + struct wlr_dmabuf_v1_buffer { struct wlr_buffer base; @@ -63,6 +65,7 @@ struct wlr_linux_dmabuf_v1 { // private state struct wlr_linux_dmabuf_feedback_v1_compiled *default_feedback; + struct wl_list surfaces; // wlr_linux_dmabuf_v1_surface.link struct wl_listener display_destroy; struct wl_listener renderer_destroy; @@ -74,4 +77,13 @@ struct wlr_linux_dmabuf_v1 { struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *display, struct wlr_renderer *renderer); +/** + * Set a surface's DMA-BUF feedback. + * + * Passing a NULL feedback resets it to the default feedback. + */ +bool wlr_linux_dmabuf_v1_set_surface_feedback( + struct wlr_linux_dmabuf_v1 *linux_dmabuf, struct wlr_surface *surface, + const struct wlr_linux_dmabuf_feedback_v1 *feedback); + #endif -- cgit v1.2.3