export-dmabuf: correctly finish wlr_linux_dmabuf_attribs

This commit is contained in:
emersion 2018-05-23 23:27:15 +01:00
parent 1377e551ef
commit 00e108f2fc
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
4 changed files with 33 additions and 17 deletions

View file

@ -2,6 +2,7 @@
#define WLR_TYPES_WLR_EXPORT_DMABUF_V1_H
#include <wayland-server.h>
#include <wlr/types/wlr_linux_dmabuf.h>
struct wlr_export_dmabuf_manager_v1;
@ -10,6 +11,7 @@ struct wlr_export_dmabuf_frame_v1 {
struct wlr_export_dmabuf_manager_v1 *manager;
struct wl_list link;
struct wlr_dmabuf_buffer_attribs attribs;
struct wlr_output *output;
struct wl_listener output_swap_buffers;

View file

@ -37,6 +37,12 @@ struct wlr_dmabuf_buffer {
struct wlr_dmabuf_buffer_attribs attributes;
};
/**
* Closes all file descriptors in the DMA-BUF attributes.
*/
void wlr_dmabuf_buffer_attribs_finish(
struct wlr_dmabuf_buffer_attribs *attribs);
/**
* Returns true if the given resource was created via the linux-dmabuf
* buffer protocol, false otherwise