mirror of
https://github.com/swaywm/sway.git
synced 2024-11-28 02:41:28 +00:00
Use wlr_texture_set
Use the new wlr_texture_set type added in wlroots to better manage textures in multi-GPU environments. References: https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4055
This commit is contained in:
parent
90c2d631e2
commit
24742d490d
|
@ -303,7 +303,7 @@ static void render_saved_view(struct sway_view *view,
|
|||
|
||||
struct sway_saved_buffer *saved_buf;
|
||||
wl_list_for_each(saved_buf, &view->saved_buffers, link) {
|
||||
if (!saved_buf->buffer->texture) {
|
||||
if (!saved_buf->buffer->texture_set) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -343,8 +343,14 @@ static void render_saved_view(struct sway_view *view,
|
|||
}
|
||||
scale_box(&dst_box, wlr_output->scale);
|
||||
|
||||
render_texture(wlr_output, damage, saved_buf->buffer->texture,
|
||||
&saved_buf->source_box, &dst_box, matrix, alpha);
|
||||
struct wlr_texture *texture = wlr_texture_set_get_tex_for_renderer(
|
||||
saved_buf->buffer->texture_set, wlr_output->renderer);
|
||||
if (!texture) {
|
||||
continue;
|
||||
}
|
||||
|
||||
render_texture(wlr_output, damage, texture, &saved_buf->source_box,
|
||||
&dst_box, matrix, alpha);
|
||||
}
|
||||
|
||||
// FIXME: we should set the surface that this saved buffer originates from
|
||||
|
|
Loading…
Reference in a new issue