mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
cogl: Remove cogl_handle_ref/unref
This is for all intents and purposes the same as `cogl_object_ref/unref`, but still refers to handles rather than objects (while we're trying to get rid of the former) so it's a bit of unnecessary redundant API. https://gitlab.gnome.org/GNOME/mutter/merge_requests/451
This commit is contained in:

committed by
Jonas Ådahl

parent
317ce05a27
commit
23f77a1b63
@ -100,13 +100,13 @@
|
||||
* // Clear the previous state //
|
||||
* if (self->rect_1)
|
||||
* {
|
||||
* cogl_handle_unref (self->rect_1);
|
||||
* cogl_object_unref (self->rect_1);
|
||||
* self->rect_1 = NULL;
|
||||
* }
|
||||
*
|
||||
* if (self->rect_2)
|
||||
* {
|
||||
* cogl_handle_unref (self->rect_2);
|
||||
* cogl_object_unref (self->rect_2);
|
||||
* self->rect_2 = NULL;
|
||||
* }
|
||||
*
|
||||
|
@ -119,7 +119,7 @@ clutter_offscreen_effect_set_actor (ClutterActorMeta *meta,
|
||||
/* clear out the previous state */
|
||||
if (priv->offscreen != NULL)
|
||||
{
|
||||
cogl_handle_unref (priv->offscreen);
|
||||
cogl_object_unref (priv->offscreen);
|
||||
priv->offscreen = NULL;
|
||||
}
|
||||
|
||||
@ -199,13 +199,13 @@ update_fbo (ClutterEffect *effect,
|
||||
|
||||
if (priv->texture != NULL)
|
||||
{
|
||||
cogl_handle_unref (priv->texture);
|
||||
cogl_object_unref (priv->texture);
|
||||
priv->texture = NULL;
|
||||
}
|
||||
|
||||
if (priv->offscreen != NULL)
|
||||
{
|
||||
cogl_handle_unref (priv->offscreen);
|
||||
cogl_object_unref (priv->offscreen);
|
||||
priv->offscreen = NULL;
|
||||
}
|
||||
|
||||
@ -224,7 +224,7 @@ update_fbo (ClutterEffect *effect,
|
||||
{
|
||||
g_warning ("%s: Unable to create an Offscreen buffer", G_STRLOC);
|
||||
|
||||
cogl_handle_unref (priv->target);
|
||||
cogl_object_unref (priv->target);
|
||||
priv->target = NULL;
|
||||
|
||||
priv->target_width = 0;
|
||||
@ -487,13 +487,13 @@ clutter_offscreen_effect_finalize (GObject *gobject)
|
||||
ClutterOffscreenEffectPrivate *priv = self->priv;
|
||||
|
||||
if (priv->offscreen)
|
||||
cogl_handle_unref (priv->offscreen);
|
||||
cogl_object_unref (priv->offscreen);
|
||||
|
||||
if (priv->target)
|
||||
cogl_handle_unref (priv->target);
|
||||
cogl_object_unref (priv->target);
|
||||
|
||||
if (priv->texture)
|
||||
cogl_handle_unref (priv->texture);
|
||||
cogl_object_unref (priv->texture);
|
||||
|
||||
G_OBJECT_CLASS (clutter_offscreen_effect_parent_class)->finalize (gobject);
|
||||
}
|
||||
|
@ -179,14 +179,14 @@ clutter_shader_effect_clear (ClutterShaderEffect *self,
|
||||
|
||||
if (priv->shader != COGL_INVALID_HANDLE)
|
||||
{
|
||||
cogl_handle_unref (priv->shader);
|
||||
cogl_object_unref (priv->shader);
|
||||
|
||||
priv->shader = COGL_INVALID_HANDLE;
|
||||
}
|
||||
|
||||
if (priv->program != COGL_INVALID_HANDLE)
|
||||
{
|
||||
cogl_handle_unref (priv->program);
|
||||
cogl_object_unref (priv->program);
|
||||
|
||||
priv->program = COGL_INVALID_HANDLE;
|
||||
}
|
||||
@ -387,10 +387,10 @@ clutter_shader_effect_try_static_source (ClutterShaderEffect *self)
|
||||
}
|
||||
}
|
||||
|
||||
priv->shader = cogl_handle_ref (class_priv->shader);
|
||||
priv->shader = cogl_object_ref (class_priv->shader);
|
||||
|
||||
if (class_priv->program != COGL_INVALID_HANDLE)
|
||||
priv->program = cogl_handle_ref (class_priv->program);
|
||||
priv->program = cogl_object_ref (class_priv->program);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -507,7 +507,7 @@ clutter_cairo_texture_create_surface (ClutterCairoTexture *self,
|
||||
cairo_stride,
|
||||
cairo_data);
|
||||
clutter_texture_set_cogl_texture (CLUTTER_TEXTURE (self), cogl_texture);
|
||||
cogl_handle_unref (cogl_texture);
|
||||
cogl_object_unref (cogl_texture);
|
||||
|
||||
return surface;
|
||||
}
|
||||
|
@ -1229,7 +1229,7 @@ clutter_texture_get_cogl_material (ClutterTexture *texture)
|
||||
* Replaces the underlying Cogl material drawn by this actor with
|
||||
* @cogl_material. A reference to the material is taken so if the
|
||||
* handle is no longer needed it should be deref'd with
|
||||
* cogl_handle_unref. Texture data is attached to the material so
|
||||
* cogl_object_unref. Texture data is attached to the material so
|
||||
* calling this function also replaces the Cogl
|
||||
* texture. #ClutterTexture requires that the material have a texture
|
||||
* layer so you should set one on the material before calling this
|
||||
@ -1302,7 +1302,7 @@ get_first_layer_index (CoglPipeline *pipeline, int *layer_index)
|
||||
*
|
||||
* Retrieves the handle to the underlying COGL texture used for drawing
|
||||
* the actor. No extra reference is taken so if you need to keep the
|
||||
* handle then you should call cogl_handle_ref() on it.
|
||||
* handle then you should call cogl_object_ref() on it.
|
||||
*
|
||||
* The texture handle returned is the first layer of the material
|
||||
* handle used by the #ClutterTexture. If you need to access the other
|
||||
@ -1342,7 +1342,7 @@ clutter_texture_get_cogl_texture (ClutterTexture *texture)
|
||||
*
|
||||
* Replaces the underlying COGL texture drawn by this actor with
|
||||
* @cogl_tex. A reference to the texture is taken so if the handle is
|
||||
* no longer needed it should be deref'd with cogl_handle_unref.
|
||||
* no longer needed it should be deref'd with cogl_object_unref.
|
||||
*
|
||||
* Since: 0.8
|
||||
*
|
||||
|
Reference in New Issue
Block a user