mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 01:20:42 -05:00
cogl: Remove unused COGL_OBJECT_DEFINE_DEPRECATED_REF_COUNTING
https://gitlab.gnome.org/GNOME/mutter/merge_requests/933
This commit is contained in:
parent
13fd213064
commit
23e9fd3dfa
@ -67,7 +67,6 @@ COGL_OBJECT_DEFINE_WITH_CODE_GTYPE (Offscreen, offscreen,
|
||||
_cogl_framebuffer_unref);
|
||||
COGL_GTYPE_DEFINE_CLASS (Offscreen, offscreen,
|
||||
COGL_GTYPE_IMPLEMENT_INTERFACE (framebuffer));
|
||||
COGL_OBJECT_DEFINE_DEPRECATED_REF_COUNTING (offscreen);
|
||||
COGL_GTYPE_DEFINE_INTERFACE (Framebuffer, framebuffer);
|
||||
|
||||
/* XXX:
|
||||
|
@ -243,37 +243,6 @@ _cogl_is_##type_name (void *object) \
|
||||
return obj->klass == &_cogl_##type_name##_class; \
|
||||
}
|
||||
|
||||
#define COGL_OBJECT_DEFINE_DEPRECATED_REF_COUNTING(type_name) \
|
||||
\
|
||||
void * G_GNUC_DEPRECATED \
|
||||
cogl_##type_name##_ref (void *object) \
|
||||
{ \
|
||||
if (!cogl_is_##type_name (object)) \
|
||||
return NULL; \
|
||||
\
|
||||
_COGL_OBJECT_DEBUG_REF (TypeName, object); \
|
||||
\
|
||||
cogl_object_ref (object); \
|
||||
\
|
||||
return object; \
|
||||
} \
|
||||
\
|
||||
void G_GNUC_DEPRECATED \
|
||||
cogl_##type_name##_unref (void *object) \
|
||||
{ \
|
||||
if (!cogl_is_##type_name (object)) \
|
||||
{ \
|
||||
g_warning (G_STRINGIFY (cogl_##type_name##_unref) \
|
||||
": Ignoring unref of Cogl handle " \
|
||||
"due to type mismatch"); \
|
||||
return; \
|
||||
} \
|
||||
\
|
||||
_COGL_OBJECT_DEBUG_UNREF (TypeName, object); \
|
||||
\
|
||||
cogl_object_unref (object); \
|
||||
}
|
||||
|
||||
#define COGL_OBJECT_DEFINE(TypeName, type_name) \
|
||||
COGL_OBJECT_DEFINE_WITH_CODE_GTYPE (TypeName, type_name, (void) 0)
|
||||
|
||||
|
@ -135,34 +135,6 @@ cogl_offscreen_new_to_texture (CoglTexture *texture);
|
||||
gboolean
|
||||
cogl_is_offscreen (void *object);
|
||||
|
||||
/**
|
||||
* cogl_offscreen_ref:
|
||||
* @offscreen: A pointer to a #CoglOffscreen framebuffer
|
||||
*
|
||||
* Increments the reference count on the @offscreen framebuffer.
|
||||
*
|
||||
* Return value: (transfer none): For convenience it returns the
|
||||
* given @offscreen
|
||||
*
|
||||
* Deprecated: 1.2: cogl_object_ref() should be used in new code.
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_object_ref)
|
||||
void *
|
||||
cogl_offscreen_ref (void *offscreen);
|
||||
|
||||
/**
|
||||
* cogl_offscreen_unref:
|
||||
* @offscreen: A pointer to a #CoglOffscreen framebuffer
|
||||
*
|
||||
* Decreases the reference count for the @offscreen buffer and frees it when
|
||||
* the count reaches 0.
|
||||
*
|
||||
* Deprecated: 1.2: cogl_object_unref() should be used in new code.
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_object_unref)
|
||||
void
|
||||
cogl_offscreen_unref (void *offscreen);
|
||||
|
||||
/**
|
||||
* cogl_offscreen_get_texture: (skip)
|
||||
*/
|
||||
|
@ -43,7 +43,6 @@
|
||||
static void _cogl_program_free (CoglProgram *program);
|
||||
|
||||
COGL_HANDLE_DEFINE (Program, program);
|
||||
COGL_OBJECT_DEFINE_DEPRECATED_REF_COUNTING (program);
|
||||
|
||||
/* A CoglProgram is effectively just a list of shaders that will be
|
||||
used together and a set of values for the custom uniforms. No
|
||||
|
@ -44,7 +44,6 @@
|
||||
static void _cogl_shader_free (CoglShader *shader);
|
||||
|
||||
COGL_HANDLE_DEFINE (Shader, shader);
|
||||
COGL_OBJECT_DEFINE_DEPRECATED_REF_COUNTING (shader);
|
||||
|
||||
#ifndef GL_FRAGMENT_SHADER
|
||||
#define GL_FRAGMENT_SHADER 0x8B30
|
||||
|
@ -249,32 +249,6 @@ COGL_DEPRECATED_FOR (cogl_snippet_)
|
||||
CoglHandle
|
||||
cogl_create_shader (CoglShaderType shader_type);
|
||||
|
||||
/**
|
||||
* cogl_shader_ref:
|
||||
* @handle: A #CoglHandle to a shader.
|
||||
*
|
||||
* Add an extra reference to a shader.
|
||||
*
|
||||
* Returns: @handle
|
||||
* Deprecated: 1.16: Use #CoglSnippet api
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_snippet_)
|
||||
CoglHandle
|
||||
cogl_shader_ref (CoglHandle handle);
|
||||
|
||||
/**
|
||||
* cogl_shader_unref:
|
||||
* @handle: A #CoglHandle to a shader.
|
||||
*
|
||||
* Removes a reference to a shader. If it was the last reference the
|
||||
* shader object will be destroyed.
|
||||
*
|
||||
* Deprecated: 1.16: Use #CoglSnippet api
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_snippet_)
|
||||
void
|
||||
cogl_shader_unref (CoglHandle handle);
|
||||
|
||||
/**
|
||||
* cogl_is_shader:
|
||||
* @handle: A CoglHandle
|
||||
@ -378,33 +352,6 @@ COGL_DEPRECATED_FOR (cogl_snippet_)
|
||||
CoglHandle
|
||||
cogl_create_program (void);
|
||||
|
||||
/**
|
||||
* cogl_program_ref:
|
||||
* @handle: A #CoglHandle to a program.
|
||||
*
|
||||
* Add an extra reference to a program.
|
||||
*
|
||||
* Deprecated: 1.0: Please use cogl_object_ref() instead.
|
||||
*
|
||||
* Returns: @handle
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_snippet_)
|
||||
CoglHandle
|
||||
cogl_program_ref (CoglHandle handle);
|
||||
|
||||
/**
|
||||
* cogl_program_unref:
|
||||
* @handle: A #CoglHandle to a program.
|
||||
*
|
||||
* Removes a reference to a program. If it was the last reference the
|
||||
* program object will be destroyed.
|
||||
*
|
||||
* Deprecated: 1.0: Please use cogl_object_unref() instead.
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_snippet_)
|
||||
void
|
||||
cogl_program_unref (CoglHandle handle);
|
||||
|
||||
/**
|
||||
* cogl_is_program:
|
||||
* @handle: A CoglHandle
|
||||
|
@ -123,7 +123,6 @@ static void _cogl_vertex_buffer_indices_free (CoglVertexBufferIndices *buffer_in
|
||||
static CoglUserDataKey _cogl_vertex_buffer_pipeline_priv_key;
|
||||
|
||||
COGL_HANDLE_DEFINE (VertexBuffer, vertex_buffer);
|
||||
COGL_OBJECT_DEFINE_DEPRECATED_REF_COUNTING (vertex_buffer);
|
||||
COGL_HANDLE_DEFINE (VertexBufferIndices, vertex_buffer_indices);
|
||||
|
||||
CoglHandle
|
||||
|
@ -351,32 +351,6 @@ cogl_vertex_buffer_draw_elements (CoglHandle handle,
|
||||
int indices_offset,
|
||||
int count);
|
||||
|
||||
/**
|
||||
* cogl_vertex_buffer_ref:
|
||||
* @handle: a @CoglHandle.
|
||||
*
|
||||
* Increment the reference count for a vertex buffer
|
||||
*
|
||||
* Return value: the @handle.
|
||||
*
|
||||
* Deprecated: 1.2: Use cogl_object_ref() instead
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_object_ref)
|
||||
CoglHandle
|
||||
cogl_vertex_buffer_ref (CoglHandle handle);
|
||||
|
||||
/**
|
||||
* cogl_vertex_buffer_unref:
|
||||
* @handle: a @CoglHandle.
|
||||
*
|
||||
* Decrement the reference count for a vertex buffer
|
||||
*
|
||||
* Deprecated: 1.2: Use cogl_object_unref() instead
|
||||
*/
|
||||
COGL_DEPRECATED_FOR (cogl_object_unref)
|
||||
void
|
||||
cogl_vertex_buffer_unref (CoglHandle handle);
|
||||
|
||||
/**
|
||||
* cogl_vertex_buffer_indices_get_for_quads:
|
||||
* @n_indices: the number of indices in the vertex buffer.
|
||||
|
Loading…
Reference in New Issue
Block a user