aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2018-11-13 12:35:08 +0100
committerSimon Ser <contact@emersion.fr>2021-12-07 15:18:16 +0100
commit1d8340754b85eaa60669875c32f9476411941892 (patch)
tree3420103dbf64fa1282910b5ad57702994fbdb994 /include/wlr
parent77d811a21b3d1dfb4ef6634e870c6c37228f3c15 (diff)
linux-dmabuf-v1: implement v4
Implement a basic version of linux-dmabuf-unstable-v1 version 4. Only default hints are implemented. The new wlr_linux_dmabuf_feedback_v1 data structure will allow compositors to define their own custom hints in the future. This data structure makes it easy to describe feedback metadata. It's converted to a "compiled" form suitable for marshalling over the Wayland socket via feedback_compile.
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_linux_dmabuf_v1.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_linux_dmabuf_v1.h b/include/wlr/types/wlr_linux_dmabuf_v1.h
index b4eb8675..bbbb2772 100644
--- a/include/wlr/types/wlr_linux_dmabuf_v1.h
+++ b/include/wlr/types/wlr_linux_dmabuf_v1.h
@@ -10,6 +10,7 @@
#define WLR_TYPES_WLR_LINUX_DMABUF_H
#include <stdint.h>
+#include <sys/stat.h>
#include <wayland-server-core.h>
#include <wlr/types/wlr_buffer.h>
#include <wlr/render/dmabuf.h>
@@ -38,6 +39,18 @@ bool wlr_dmabuf_v1_resource_is_buffer(struct wl_resource *buffer_resource);
struct wlr_dmabuf_v1_buffer *wlr_dmabuf_v1_buffer_from_buffer_resource(
struct wl_resource *buffer_resource);
+struct wlr_linux_dmabuf_feedback_v1 {
+ dev_t main_device;
+ size_t tranches_len;
+ const struct wlr_linux_dmabuf_feedback_v1_tranche *tranches;
+};
+
+struct wlr_linux_dmabuf_feedback_v1_tranche {
+ dev_t target_device;
+ uint32_t flags; // bitfield of enum zwp_linux_dmabuf_feedback_v1_tranche_flags
+ const struct wlr_drm_format_set *formats;
+};
+
/* the protocol interface */
struct wlr_linux_dmabuf_v1 {
struct wl_global *global;
@@ -49,6 +62,8 @@ struct wlr_linux_dmabuf_v1 {
// private state
+ struct wlr_linux_dmabuf_feedback_v1_compiled *default_feedback;
+
struct wl_listener display_destroy;
struct wl_listener renderer_destroy;
};