cursor: Split out code that frees the MetaCursorReference

This commit is contained in:
Jasper St. Pierre 2014-03-31 16:56:03 -04:00
parent f95f2b0c6d
commit f4e299ca46

View File

@ -46,12 +46,8 @@ meta_cursor_reference_ref (MetaCursorReference *self)
return self; return self;
} }
void static void
meta_cursor_reference_unref (MetaCursorReference *self) meta_cursor_reference_free (MetaCursorReference *self)
{
self->ref_count--;
if (self->ref_count == 0)
{ {
cogl_object_unref (self->texture); cogl_object_unref (self->texture);
if (self->bo) if (self->bo)
@ -59,6 +55,14 @@ meta_cursor_reference_unref (MetaCursorReference *self)
g_slice_free (MetaCursorReference, self); g_slice_free (MetaCursorReference, self);
} }
void
meta_cursor_reference_unref (MetaCursorReference *self)
{
self->ref_count--;
if (self->ref_count == 0)
meta_cursor_reference_free (self);
} }
static void static void