mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-05 13:29:47 -05:00
buffer: add format param to get_data_ptr
Allow wlr_buffer_impl.get_data_ptr to return a format. This allows the Pixman renderer to not care about get_dmabuf/get_shm, and only care about get_data_ptr. This will also help with [1], because client wl_shm buffers can't implement get_shm. [1]: https://github.com/swaywm/wlroots/pull/2892 References: https://github.com/swaywm/wlroots/issues/2864
This commit is contained in:
parent
ccbce0f0a6
commit
24fde77c62
5 changed files with 12 additions and 20 deletions
|
|
@ -2,14 +2,15 @@
|
|||
#define TYPES_WLR_BUFFER
|
||||
|
||||
#include <wlr/types/wlr_buffer.h>
|
||||
|
||||
/**
|
||||
* Access a pointer to the allocated data from the underlying implementation,
|
||||
* and its stride.
|
||||
* its format and its stride.
|
||||
*
|
||||
* The returned pointer should be pointing to a valid memory location for read
|
||||
* and write operations.
|
||||
*/
|
||||
bool buffer_get_data_ptr(struct wlr_buffer *buffer, void **data,
|
||||
size_t *stride);
|
||||
uint32_t *format, size_t *stride);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue