aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-04-29 22:33:46 +0300
committerDrew DeVault <sir@cmpwn.com>2019-06-07 09:06:11 -0400
commit493804e4215ee23101305e0bf5598bb6f21fb663 (patch)
treee8d99764732cc963163107d23b33466778777195 /include/wlr
parent6dbdf5db345c47ac6edf92161cb7b521c8284e39 (diff)
buffer: add wlr_buffer_get_dmabuf
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_buffer.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_buffer.h b/include/wlr/types/wlr_buffer.h
index 0c987b17..11b36596 100644
--- a/include/wlr/types/wlr_buffer.h
+++ b/include/wlr/types/wlr_buffer.h
@@ -11,6 +11,7 @@
#include <pixman.h>
#include <wayland-server.h>
+#include <wlr/render/dmabuf.h>
/**
* A client buffer.
@@ -67,5 +68,11 @@ void wlr_buffer_unref(struct wlr_buffer *buffer);
*/
struct wlr_buffer *wlr_buffer_apply_damage(struct wlr_buffer *buffer,
struct wl_resource *resource, pixman_region32_t *damage);
+/**
+ * Reads the DMA-BUF attributes of the buffer. If this buffer isn't a DMA-BUF,
+ * returns false.
+ */
+bool wlr_buffer_get_dmabuf(struct wlr_buffer *buffer,
+ struct wlr_dmabuf_attributes *attribs);
#endif