mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
buffer: add wlr_dmabuf_buffer
This commit is contained in:
parent
18adb43a44
commit
08e5b909f9
2 changed files with 83 additions and 0 deletions
|
|
@ -53,6 +53,25 @@ struct wlr_readonly_data_buffer *readonly_data_buffer_create(uint32_t format,
|
|||
*/
|
||||
bool readonly_data_buffer_drop(struct wlr_readonly_data_buffer *buffer);
|
||||
|
||||
struct wlr_dmabuf_buffer {
|
||||
struct wlr_buffer base;
|
||||
struct wlr_dmabuf_attributes dmabuf;
|
||||
bool saved;
|
||||
};
|
||||
|
||||
/**
|
||||
* Wraps a DMA-BUF into a wlr_buffer. The DMA-BUF may be accessed until
|
||||
* dmabuf_buffer_drop() is called.
|
||||
*/
|
||||
struct wlr_dmabuf_buffer *dmabuf_buffer_create(
|
||||
struct wlr_dmabuf_attributes *dmabuf);
|
||||
/**
|
||||
* Drops ownership of the buffer (see wlr_buffer_drop() for more details) and
|
||||
* takes a reference to the DMA-BUF (by dup'ing its file descriptors) if a
|
||||
* consumer still has the buffer locked.
|
||||
*/
|
||||
bool dmabuf_buffer_drop(struct wlr_dmabuf_buffer *buffer);
|
||||
|
||||
/**
|
||||
* Buffer capabilities.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue