mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
shaped-texture: Minor clean up
Use cogl_clear_object(), add reference to texture when setting, and remove redundant runtime type check. https://gitlab.gnome.org/GNOME/mutter/merge_requests/961
This commit is contained in:
parent
fcfe90aa9f
commit
60ebf19c9e
@ -461,16 +461,11 @@ set_cogl_texture (MetaShapedTexture *stex,
|
|||||||
{
|
{
|
||||||
int width, height;
|
int width, height;
|
||||||
|
|
||||||
g_return_if_fail (META_IS_SHAPED_TEXTURE (stex));
|
cogl_clear_object (&stex->texture);
|
||||||
|
|
||||||
if (stex->texture)
|
|
||||||
cogl_object_unref (stex->texture);
|
|
||||||
|
|
||||||
stex->texture = cogl_tex;
|
|
||||||
|
|
||||||
if (cogl_tex != NULL)
|
if (cogl_tex != NULL)
|
||||||
{
|
{
|
||||||
cogl_object_ref (cogl_tex);
|
stex->texture = cogl_object_ref (cogl_tex);
|
||||||
width = cogl_texture_get_width (COGL_TEXTURE (cogl_tex));
|
width = cogl_texture_get_width (COGL_TEXTURE (cogl_tex));
|
||||||
height = cogl_texture_get_height (COGL_TEXTURE (cogl_tex));
|
height = cogl_texture_get_height (COGL_TEXTURE (cogl_tex));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user