mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
shaped-texture: Add checks to viewport reset functions
The set and reset functions are unconditionally called on every commit. Add missings checks to the reset functions to bail out if nothing changed. https://gitlab.gnome.org/GNOME/mutter/merge_requests/504
This commit is contained in:
parent
db486ad897
commit
96f7bf28f1
@ -1214,6 +1214,9 @@ meta_shaped_texture_set_viewport_src_rect (MetaShapedTexture *stex,
|
||||
void
|
||||
meta_shaped_texture_reset_viewport_src_rect (MetaShapedTexture *stex)
|
||||
{
|
||||
if (!stex->has_viewport_src_rect)
|
||||
return;
|
||||
|
||||
stex->has_viewport_src_rect = FALSE;
|
||||
invalidate_size (stex);
|
||||
}
|
||||
@ -1237,6 +1240,9 @@ meta_shaped_texture_set_viewport_dst_size (MetaShapedTexture *stex,
|
||||
void
|
||||
meta_shaped_texture_reset_viewport_dst_size (MetaShapedTexture *stex)
|
||||
{
|
||||
if (!stex->has_viewport_dst_size)
|
||||
return;
|
||||
|
||||
stex->has_viewport_dst_size = FALSE;
|
||||
invalidate_size (stex);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user