mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
linux_dmabuf_v1: allow callbacks for checking dmabuf import
This commit is contained in:
parent
811ca199c4
commit
4cd556ea20
2 changed files with 27 additions and 3 deletions
|
|
@ -64,6 +64,9 @@ struct wlr_linux_dmabuf_v1 {
|
|||
int main_device_fd; // to sanity check FDs sent by clients, -1 if unavailable
|
||||
|
||||
struct wl_listener display_destroy;
|
||||
|
||||
bool (*check_dmabuf_callback)(struct wlr_dmabuf_attributes *attribs, void *data);
|
||||
void *check_dmabuf_callback_data;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -83,6 +86,15 @@ struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create(struct wl_display *displa
|
|||
struct wlr_linux_dmabuf_v1 *wlr_linux_dmabuf_v1_create_with_renderer(struct wl_display *display,
|
||||
uint32_t version, struct wlr_renderer *renderer);
|
||||
|
||||
/**
|
||||
* Set the dmabuf import check callback
|
||||
*
|
||||
* This can be used by consumers who want to implement specific dmabuf checks. Useful for
|
||||
* users such as gamescope who do not use the rendering logic of wlroots.
|
||||
*/
|
||||
void wlr_linux_dmabuf_v1_set_check_dmabuf_callback(struct wlr_linux_dmabuf_v1 *linux_dmabuf,
|
||||
bool (*callback)(struct wlr_dmabuf_attributes *attribs, void *data), void *data);
|
||||
|
||||
/**
|
||||
* Set a surface's DMA-BUF feedback.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue