mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
render: replace wlr_texture_write_pixels with update_from_buffer
This lets the renderer handle the wlr_buffer directly, just like it does in texture_from_buffer. This also allows the renderer to batch the rectangle updates, and update more than the damage region if desirable (e.g. too many rects), so can be more efficient.
This commit is contained in:
parent
8c3c6987db
commit
98cf38601f
7 changed files with 101 additions and 87 deletions
|
|
@ -54,10 +54,8 @@ void wlr_renderer_init(struct wlr_renderer *renderer,
|
|||
const struct wlr_renderer_impl *impl);
|
||||
|
||||
struct wlr_texture_impl {
|
||||
bool (*write_pixels)(struct wlr_texture *texture,
|
||||
uint32_t stride, uint32_t width, uint32_t height,
|
||||
uint32_t src_x, uint32_t src_y, uint32_t dst_x, uint32_t dst_y,
|
||||
const void *data);
|
||||
bool (*update_from_buffer)(struct wlr_texture *texture,
|
||||
struct wlr_buffer *buffer, pixman_region32_t *damage);
|
||||
void (*destroy)(struct wlr_texture *texture);
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue