mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
cursor: Split out code that frees the MetaCursorReference
This commit is contained in:
parent
f95f2b0c6d
commit
f4e299ca46
@ -46,19 +46,23 @@ meta_cursor_reference_ref (MetaCursorReference *self)
|
|||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
meta_cursor_reference_free (MetaCursorReference *self)
|
||||||
|
{
|
||||||
|
cogl_object_unref (self->texture);
|
||||||
|
if (self->bo)
|
||||||
|
gbm_bo_destroy (self->bo);
|
||||||
|
|
||||||
|
g_slice_free (MetaCursorReference, self);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
meta_cursor_reference_unref (MetaCursorReference *self)
|
meta_cursor_reference_unref (MetaCursorReference *self)
|
||||||
{
|
{
|
||||||
self->ref_count--;
|
self->ref_count--;
|
||||||
|
|
||||||
if (self->ref_count == 0)
|
if (self->ref_count == 0)
|
||||||
{
|
meta_cursor_reference_free (self);
|
||||||
cogl_object_unref (self->texture);
|
|
||||||
if (self->bo)
|
|
||||||
gbm_bo_destroy (self->bo);
|
|
||||||
|
|
||||||
g_slice_free (MetaCursorReference, self);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user