aboutsummaryrefslogtreecommitdiff
path: root/render/dmabuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'render/dmabuf.c')
-rw-r--r--render/dmabuf.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/render/dmabuf.c b/render/dmabuf.c
new file mode 100644
index 00000000..6b500748
--- /dev/null
+++ b/render/dmabuf.c
@@ -0,0 +1,10 @@
+#include <unistd.h>
+#include <wlr/render/dmabuf.h>
+
+void wlr_dmabuf_attributes_finish( struct wlr_dmabuf_attributes *attribs) {
+ for (int i = 0; i < attribs->n_planes; ++i) {
+ close(attribs->fd[i]);
+ attribs->fd[i] = -1;
+ }
+ attribs->n_planes = 0;
+}