mirror of
https://github.com/brl/mutter.git
synced 2024-11-13 01:36:10 -05:00
[clutter-texture] Release the temporary ref taken when setting a texture
When setting the cogl texture, the ClutterTexture takes a reference to the Cogl handle but the material takes an additional reference when it is set as the layer. Nothing was unrefing the temporary reference so the textures were being leaked.
This commit is contained in:
parent
8feb99722c
commit
ee0bf5e26d
@ -1299,6 +1299,10 @@ clutter_texture_set_cogl_texture (ClutterTexture *texture,
|
||||
|
||||
cogl_material_set_layer (priv->material, 0, cogl_tex);
|
||||
|
||||
/* The material now holds a reference to the texture so we can
|
||||
safely release the reference we claimed above */
|
||||
cogl_texture_unref (cogl_tex);
|
||||
|
||||
size_change = width != priv->width || height != priv->height;
|
||||
priv->width = width;
|
||||
priv->height = height;
|
||||
|
Loading…
Reference in New Issue
Block a user