mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
buffer: replace get_data_ptr with {begin,end}_data_ptr_access
This new API allows buffer implementations to know when a user is actively accessing the buffer's underlying storage. This is important for the upcoming client-backed wlr_buffer implementation.
This commit is contained in:
parent
9e58301df7
commit
38ba5881a0
7 changed files with 79 additions and 18 deletions
|
|
@ -81,7 +81,8 @@ struct wlr_buffer *wlr_allocator_create_buffer(struct wlr_allocator *alloc,
|
|||
return NULL;
|
||||
}
|
||||
if (alloc->buffer_caps & WLR_BUFFER_CAP_DATA_PTR) {
|
||||
assert(buffer->impl->get_data_ptr);
|
||||
assert(buffer->impl->begin_data_ptr_access &&
|
||||
buffer->impl->end_data_ptr_access);
|
||||
}
|
||||
if (alloc->buffer_caps & WLR_BUFFER_CAP_DMABUF) {
|
||||
assert(buffer->impl->get_dmabuf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue