mirror of
https://github.com/brl/mutter.git
synced 2024-11-29 03:20:46 -05:00
cogl: explicitly mark cogl_<object>_ref/unref APIs as deprecated
This uses the G_GNUC_DEPRECATED macros to mark the cogl_{texture,vertex_buffer,shader}_ref and unref APIs as deprecated. Since this flagged that cogl-pango-display-list.c and clutter-glx-texture-pixmap.c were still using deprecated _ref/_unref APIs they have now been changed to use the cogl_handle_ref/unref API instead.
This commit is contained in:
parent
7d9b733446
commit
f93e50a281
@ -69,6 +69,8 @@ typedef enum {
|
|||||||
CoglHandle
|
CoglHandle
|
||||||
cogl_create_shader (CoglShaderType shader_type);
|
cogl_create_shader (CoglShaderType shader_type);
|
||||||
|
|
||||||
|
#ifndef COGL_DISABLE_DEPRECATED
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_shader_ref:
|
* cogl_shader_ref:
|
||||||
* @handle: A #CoglHandle to a shader.
|
* @handle: A #CoglHandle to a shader.
|
||||||
@ -78,7 +80,7 @@ cogl_create_shader (CoglShaderType shader_type);
|
|||||||
* Returns: @handle
|
* Returns: @handle
|
||||||
*/
|
*/
|
||||||
CoglHandle
|
CoglHandle
|
||||||
cogl_shader_ref (CoglHandle handle);
|
cogl_shader_ref (CoglHandle handle) G_GNUC_DEPRECATED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_shader_unref:
|
* cogl_shader_unref:
|
||||||
@ -88,7 +90,9 @@ cogl_shader_ref (CoglHandle handle);
|
|||||||
* shader object will be destroyed.
|
* shader object will be destroyed.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_shader_unref (CoglHandle handle);
|
cogl_shader_unref (CoglHandle handle) G_GNUC_DEPRECATED;
|
||||||
|
|
||||||
|
#endif /* COGL_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_is_shader:
|
* cogl_is_shader:
|
||||||
|
@ -433,7 +433,7 @@ cogl_texture_new_from_buffer_EXP (CoglHandle buffer,
|
|||||||
* Return value: the @handle.
|
* Return value: the @handle.
|
||||||
*/
|
*/
|
||||||
CoglHandle
|
CoglHandle
|
||||||
cogl_texture_ref (CoglHandle handle);
|
cogl_texture_ref (CoglHandle handle) G_GNUC_DEPRECATED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_texture_unref:
|
* cogl_texture_unref:
|
||||||
@ -444,7 +444,7 @@ cogl_texture_ref (CoglHandle handle);
|
|||||||
* Deprecated: 1.2: Use cogl_handle_unref() instead
|
* Deprecated: 1.2: Use cogl_handle_unref() instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_texture_unref (CoglHandle handle);
|
cogl_texture_unref (CoglHandle handle) G_GNUC_DEPRECATED;
|
||||||
|
|
||||||
#endif /* COGL_DISABLE_DEPRECATED */
|
#endif /* COGL_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
|
@ -385,7 +385,7 @@ cogl_vertex_buffer_draw_elements (CoglHandle handle,
|
|||||||
* Deprecated: 1.2: Use cogl_handle_ref() instead
|
* Deprecated: 1.2: Use cogl_handle_ref() instead
|
||||||
*/
|
*/
|
||||||
CoglHandle
|
CoglHandle
|
||||||
cogl_vertex_buffer_ref (CoglHandle handle);
|
cogl_vertex_buffer_ref (CoglHandle handle) G_GNUC_DEPRECATED;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cogl_vertex_buffer_unref:
|
* cogl_vertex_buffer_unref:
|
||||||
@ -396,7 +396,7 @@ cogl_vertex_buffer_ref (CoglHandle handle);
|
|||||||
* Deprecated: 1.2: Use cogl_handle_unref() instead
|
* Deprecated: 1.2: Use cogl_handle_unref() instead
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
cogl_vertex_buffer_unref (CoglHandle handle);
|
cogl_vertex_buffer_unref (CoglHandle handle) G_GNUC_DEPRECATED;
|
||||||
|
|
||||||
#endif /* COGL_DISABLE_DEPRECATED */
|
#endif /* COGL_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
|
@ -144,7 +144,7 @@ _cogl_pango_display_list_add_texture (CoglPangoDisplayList *dl,
|
|||||||
/* Get rid of the vertex buffer so that it will be recreated */
|
/* Get rid of the vertex buffer so that it will be recreated */
|
||||||
if (node->d.texture.vertex_buffer != COGL_INVALID_HANDLE)
|
if (node->d.texture.vertex_buffer != COGL_INVALID_HANDLE)
|
||||||
{
|
{
|
||||||
cogl_vertex_buffer_unref (node->d.texture.vertex_buffer);
|
cogl_handle_unref (node->d.texture.vertex_buffer);
|
||||||
node->d.texture.vertex_buffer = COGL_INVALID_HANDLE;
|
node->d.texture.vertex_buffer = COGL_INVALID_HANDLE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -156,7 +156,7 @@ _cogl_pango_display_list_add_texture (CoglPangoDisplayList *dl,
|
|||||||
node->type = COGL_PANGO_DISPLAY_LIST_TEXTURE;
|
node->type = COGL_PANGO_DISPLAY_LIST_TEXTURE;
|
||||||
node->color_override = dl->color_override;
|
node->color_override = dl->color_override;
|
||||||
node->color = dl->color;
|
node->color = dl->color;
|
||||||
node->d.texture.texture = cogl_texture_ref (texture);
|
node->d.texture.texture = cogl_handle_ref (texture);
|
||||||
node->d.texture.verts
|
node->d.texture.verts
|
||||||
= g_array_new (FALSE, FALSE, sizeof (CoglPangoDisplayListVertex));
|
= g_array_new (FALSE, FALSE, sizeof (CoglPangoDisplayListVertex));
|
||||||
node->d.texture.vertex_buffer = COGL_INVALID_HANDLE;
|
node->d.texture.vertex_buffer = COGL_INVALID_HANDLE;
|
||||||
@ -392,9 +392,9 @@ _cogl_pango_display_list_node_free (CoglPangoDisplayListNode *node)
|
|||||||
{
|
{
|
||||||
g_array_free (node->d.texture.verts, TRUE);
|
g_array_free (node->d.texture.verts, TRUE);
|
||||||
if (node->d.texture.texture != COGL_INVALID_HANDLE)
|
if (node->d.texture.texture != COGL_INVALID_HANDLE)
|
||||||
cogl_texture_unref (node->d.texture.texture);
|
cogl_handle_unref (node->d.texture.texture);
|
||||||
if (node->d.texture.vertex_buffer != COGL_INVALID_HANDLE)
|
if (node->d.texture.vertex_buffer != COGL_INVALID_HANDLE)
|
||||||
cogl_vertex_buffer_unref (node->d.texture.vertex_buffer);
|
cogl_handle_unref (node->d.texture.vertex_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
g_slice_free (CoglPangoDisplayListNode, node);
|
g_slice_free (CoglPangoDisplayListNode, node);
|
||||||
|
Loading…
Reference in New Issue
Block a user