[mutter] shaped-texture: Invalidate mask texture when main texture changes size



commit ca1b4382c066b3e2efa54217762b889a1282270d
Author: Rui Matos <tiagomatos gmail com>
Date:   Wed Feb 24 19:24:09 2016 +0100

    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 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-shaped-texture.c b/src/compositor/meta-shaped-texture.c
index d9562f1..b744744 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);
     }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]