diff options
Diffstat (limited to 'render')
-rw-r--r-- | render/allocator/drm_dumb.c | 2 | ||||
-rw-r--r-- | render/allocator/shm.c | 2 | ||||
-rw-r--r-- | render/gles2/texture.c | 3 | ||||
-rw-r--r-- | render/pixman/renderer.c | 15 |
4 files changed, 14 insertions, 8 deletions
diff --git a/render/allocator/drm_dumb.c b/render/allocator/drm_dumb.c index ea982a03..170d9c33 100644 --- a/render/allocator/drm_dumb.c +++ b/render/allocator/drm_dumb.c @@ -128,7 +128,7 @@ create_err: } static bool drm_dumb_buffer_begin_data_ptr_access(struct wlr_buffer *wlr_buffer, - void **data, uint32_t *format, size_t *stride) { + uint32_t flags, void **data, uint32_t *format, size_t *stride) { struct wlr_drm_dumb_buffer *buf = drm_dumb_buffer_from_buffer(wlr_buffer); *data = buf->data; *stride = buf->stride; diff --git a/render/allocator/shm.c b/render/allocator/shm.c index 7b32cf8d..77054dbe 100644 --- a/render/allocator/shm.c +++ b/render/allocator/shm.c @@ -31,7 +31,7 @@ static bool buffer_get_shm(struct wlr_buffer *wlr_buffer, } static bool shm_buffer_begin_data_ptr_access(struct wlr_buffer *wlr_buffer, - void **data, uint32_t *format, size_t *stride) { + uint32_t flags, void **data, uint32_t *format, size_t *stride) { struct wlr_shm_buffer *buffer = shm_buffer_from_buffer(wlr_buffer); *data = buffer->data; *format = buffer->shm.format; diff --git a/render/gles2/texture.c b/render/gles2/texture.c index 0368c1a1..64ac05ac 100644 --- a/render/gles2/texture.c +++ b/render/gles2/texture.c @@ -346,7 +346,8 @@ struct wlr_texture *gles2_texture_from_buffer(struct wlr_renderer *wlr_renderer, struct wlr_dmabuf_attributes dmabuf; if (wlr_buffer_get_dmabuf(buffer, &dmabuf)) { return gles2_texture_from_dmabuf_buffer(renderer, buffer, &dmabuf); - } else if (buffer_begin_data_ptr_access(buffer, &data, &format, &stride)) { + } else if (buffer_begin_data_ptr_access(buffer, + WLR_BUFFER_DATA_PTR_ACCESS_READ, &data, &format, &stride)) { struct wlr_texture *tex = gles2_texture_from_pixels(wlr_renderer, format, stride, buffer->width, buffer->height, data); buffer_end_data_ptr_access(buffer); diff --git a/render/pixman/renderer.c b/render/pixman/renderer.c index e153cf00..4eb1bd3f 100644 --- a/render/pixman/renderer.c +++ b/render/pixman/renderer.c @@ -96,7 +96,9 @@ static struct wlr_pixman_buffer *create_buffer( void *data = NULL; uint32_t drm_format; size_t stride; - if (!buffer_begin_data_ptr_access(wlr_buffer, &data, &drm_format, &stride)) { + if (!buffer_begin_data_ptr_access(wlr_buffer, + WLR_BUFFER_DATA_PTR_ACCESS_READ | WLR_BUFFER_DATA_PTR_ACCESS_WRITE, + &data, &drm_format, &stride)) { wlr_log(WLR_ERROR, "Failed to get buffer data"); goto error_buffer; } @@ -143,7 +145,9 @@ static void pixman_begin(struct wlr_renderer *wlr_renderer, uint32_t width, void *data = NULL; uint32_t drm_format; size_t stride; - buffer_begin_data_ptr_access(buffer->buffer, &data, &drm_format, &stride); + buffer_begin_data_ptr_access(buffer->buffer, + WLR_BUFFER_DATA_PTR_ACCESS_READ | WLR_BUFFER_DATA_PTR_ACCESS_WRITE, + &data, &drm_format, &stride); // If the data pointer has changed, re-create the Pixman image. This can // happen if it's a client buffer and the wl_shm_pool has been resized. @@ -229,8 +233,8 @@ static bool pixman_render_subtexture_with_matrix( void *data; uint32_t drm_format; size_t stride; - if (!buffer_begin_data_ptr_access(texture->buffer, &data, &drm_format, - &stride)) { + if (!buffer_begin_data_ptr_access(texture->buffer, + WLR_BUFFER_DATA_PTR_ACCESS_READ, &data, &drm_format, &stride)) { return false; } @@ -376,7 +380,8 @@ static struct wlr_texture *pixman_texture_from_buffer( void *data = NULL; uint32_t drm_format; size_t stride; - if (!buffer_begin_data_ptr_access(buffer, &data, &drm_format, &stride)) { + if (!buffer_begin_data_ptr_access(buffer, WLR_BUFFER_DATA_PTR_ACCESS_READ, + &data, &drm_format, &stride)) { return NULL; } buffer_end_data_ptr_access(buffer); |