1
0
Fork 0

shaped-texture: Reset pipelines after setting a texture with new size

Attaching a new buffer with a different size than the old one means
that the viewport needs to be recalculated.

Not doing this caused the viewport to be incorrectly applied when
viewport_src_rect remained the same after attaching such buffer.
Pipeline reset usually happens when applying a new viewport,
but it doesn't happen when the viewport values remain the same.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2689>
This commit is contained in:
Sebastian Krzyszkowiak 2022-11-05 21:28:14 +01:00 committed by Marge Bot
parent 7e838b1115
commit e331e38a19

View file

@ -552,6 +552,7 @@ set_cogl_texture (MetaShapedTexture *stex,
{ {
stex->tex_width = width; stex->tex_width = width;
stex->tex_height = height; stex->tex_height = height;
meta_shaped_texture_reset_pipelines (stex);
update_size (stex); update_size (stex);
} }