2018-07-13 14:40:56 +02:00
|
|
|
/*
|
|
|
|
* This an unstable interface of wlroots. No guarantees are made regarding the
|
|
|
|
* future consistency of this API.
|
|
|
|
*/
|
|
|
|
#ifndef WLR_USE_UNSTABLE
|
|
|
|
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
|
|
|
#endif
|
|
|
|
|
2018-05-29 23:38:00 +02:00
|
|
|
#ifndef WLR_RENDER_DMABUF_H
|
|
|
|
#define WLR_RENDER_DMABUF_H
|
|
|
|
|
2019-04-29 21:32:35 +02:00
|
|
|
#include <stdbool.h>
|
2018-05-31 13:33:27 +02:00
|
|
|
#include <stdint.h>
|
|
|
|
|
2018-05-29 23:38:00 +02:00
|
|
|
#define WLR_DMABUF_MAX_PLANES 4
|
|
|
|
|
|
|
|
struct wlr_dmabuf_attributes {
|
|
|
|
int32_t width, height;
|
|
|
|
uint32_t format;
|
|
|
|
uint64_t modifier;
|
|
|
|
|
|
|
|
int n_planes;
|
|
|
|
uint32_t offset[WLR_DMABUF_MAX_PLANES];
|
|
|
|
uint32_t stride[WLR_DMABUF_MAX_PLANES];
|
|
|
|
int fd[WLR_DMABUF_MAX_PLANES];
|
|
|
|
};
|
|
|
|
|
2018-05-31 13:33:27 +02:00
|
|
|
/**
|
|
|
|
* Closes all file descriptors in the DMA-BUF attributes.
|
|
|
|
*/
|
|
|
|
void wlr_dmabuf_attributes_finish(struct wlr_dmabuf_attributes *attribs);
|
2019-04-29 21:32:35 +02:00
|
|
|
/**
|
|
|
|
* Clones the DMA-BUF attributes.
|
|
|
|
*/
|
|
|
|
bool wlr_dmabuf_attributes_copy(struct wlr_dmabuf_attributes *dst,
|
2021-02-02 19:53:16 +01:00
|
|
|
const struct wlr_dmabuf_attributes *src);
|
2018-05-31 13:33:27 +02:00
|
|
|
|
2018-05-29 23:38:00 +02:00
|
|
|
#endif
|