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
This commit is contained in:
parent
f6ba3bdfc2
commit
ca1b4382c0
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user