mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
surface: remove wlr_surface.texture
The texture is managed by the surface's wlr_buffer now. In particular, the buffer can destroy the texture early if it becomes invalid.
This commit is contained in:
parent
d643361c48
commit
0378d143d9
5 changed files with 38 additions and 15 deletions
|
|
@ -189,7 +189,8 @@ static void render_surface(struct wlr_surface *surface, int sx, int sy,
|
|||
struct roots_output *output = data->output;
|
||||
float rotation = data->layout.rotation;
|
||||
|
||||
if (!wlr_surface_has_buffer(surface)) {
|
||||
struct wlr_texture *texture = wlr_surface_get_texture(surface);
|
||||
if (texture == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -230,8 +231,7 @@ static void render_surface(struct wlr_surface *surface, int sx, int sy,
|
|||
pixman_box32_t *rects = pixman_region32_rectangles(&damage, &nrects);
|
||||
for (int i = 0; i < nrects; ++i) {
|
||||
scissor_output(output, &rects[i]);
|
||||
wlr_render_texture_with_matrix(renderer, surface->texture, matrix,
|
||||
data->alpha);
|
||||
wlr_render_texture_with_matrix(renderer, texture, matrix, data->alpha);
|
||||
}
|
||||
|
||||
damage_finish:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue