aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-06-07 18:20:45 +0200
committerSimon Ser <contact@emersion.fr>2021-12-07 15:18:19 +0100
commitc50c4fc5cc7fc4c1e8e7ecd5d21bb821d0f7cfb6 (patch)
tree62f5d3238369b2acf91e98a9ef1c9997d4dd9480 /include/wlr
parent1d8340754b85eaa60669875c32f9476411941892 (diff)
linux-dmabuf-v1: add per-surface feedback
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_linux_dmabuf_v1.h12
1 files changed, 12 insertions, 0 deletions
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 <wlr/types/wlr_buffer.h>
#include <wlr/render/dmabuf.h>
+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