mirror of
https://github.com/brl/mutter.git
synced 2024-11-27 10:30:47 -05:00
shaped-texture: Make setting the same texture a no-op
Will be helpful when pushing state to the shaped texture, letting the
one pushing not have to care about checking if anything changed.
https://gitlab.gnome.org/GNOME/mutter/merge_requests/961
(cherry picked from commit 3969285e5c
)
This commit is contained in:
parent
81b7196ad9
commit
06fc756f0f
@ -932,6 +932,9 @@ meta_shaped_texture_set_texture (MetaShapedTexture *stex,
|
|||||||
{
|
{
|
||||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
||||||
|
|
||||||
|
if (stex->texture == texture)
|
||||||
|
return;
|
||||||
|
|
||||||
set_cogl_texture (stex, texture);
|
set_cogl_texture (stex, texture);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user