From ca1b4382c066b3e2efa54217762b889a1282270d Mon Sep 17 00:00:00 2001 From: Rui Matos Date: Wed, 24 Feb 2016 19:24:09 +0100 Subject: [PATCH] shaped-texture: Invalidate mask texture when main texture changes size We currently rely only on MetaWindowActor to update the mask texture. This isn't good enough since we might get asked to use the mask (e.g. via meta_shaped_texture_get_image() ) after having a new texture size but before MetaWindowActor decides to update the mask in which case we might crash since cogl_texture_new_from_sub_texture() might fail with an early return such as Cogl-CRITICAL **: cogl_sub_texture_new: assertion 'sub_x + sub_width <= next_width' failed https://bugzilla.gnome.org/show_bug.cgi?id=762639 --- src/compositor/meta-shaped-texture.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c index d9562f11f..b74474405 100644 --- a/src/compositor/meta-shaped-texture.c +++ b/src/compositor/meta-shaped-texture.c @@ -303,6 +303,7 @@ set_cogl_texture (MetaShapedTexture *stex, { priv->tex_width = width; priv->tex_height = height; + meta_shaped_texture_set_mask_texture (stex, NULL); clutter_actor_queue_relayout (CLUTTER_ACTOR (stex)); g_signal_emit (stex, signals[SIZE_CHANGED], 0); }