From 06fc756f0f894d0681938d6f6727d74c5236c315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 6 Dec 2019 18:39:56 +0100 Subject: [PATCH] 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 3969285e5cf1068c26775d3fcc9c2c95e61ac467) --- src/compositor/meta-shaped-texture.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index f22c3b65c..5df672191 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -932,6 +932,9 @@ meta_shaped_texture_set_texture (MetaShapedTexture *stex, { g_return_if_fail (META_IS_SHAPED_TEXTURE (stex)); + if (stex->texture == texture) + return; + set_cogl_texture (stex, texture); }