[mutter] shaped-texture: Make setting the same texture a no-op
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] shaped-texture: Make setting the same texture a no-op
- Date: Fri, 10 Jan 2020 16:09:39 +0000 (UTC)
commit 3969285e5cf1068c26775d3fcc9c2c95e61ac467
Author: Jonas Ã…dahl <jadahl gmail com>
Date: Fri Dec 6 18:39:56 2019 +0100
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
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 2e3020d4e..49c91ff1c 100644
--- a/src/compositor/meta-shaped-texture.c
+++ b/src/compositor/meta-shaped-texture.c
@@ -944,6 +944,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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]