[mutter] cogl: Remove unused COGL_OBJECT_DEFINE_DEPRECATED_REF_COUNTING



commit 23e9fd3dfa77aeb43d2d90ecc5215135f1bfaaa9
Author: Adam Jackson <ajax redhat com>
Date:   Tue Nov 5 13:57:20 2019 -0500

    cogl: Remove unused COGL_OBJECT_DEFINE_DEPRECATED_REF_COUNTING
    
    https://gitlab.gnome.org/GNOME/mutter/merge_requests/933

 cogl/cogl/cogl-framebuffer.c              |  1 -
 cogl/cogl/cogl-object-private.h           | 31 ------------------
 cogl/cogl/cogl-offscreen.h                | 28 ----------------
 cogl/cogl/deprecated/cogl-program.c       |  1 -
 cogl/cogl/deprecated/cogl-shader.c        |  1 -
 cogl/cogl/deprecated/cogl-shader.h        | 53 -------------------------------
 cogl/cogl/deprecated/cogl-vertex-buffer.c |  1 -
 cogl/cogl/deprecated/cogl-vertex-buffer.h | 26 ---------------
 8 files changed, 142 deletions(-)
---
diff --git a/cogl/cogl/cogl-framebuffer.c b/cogl/cogl/cogl-framebuffer.c
index 55dda24a7..602eb0bc0 100644
--- a/cogl/cogl/cogl-framebuffer.c
+++ b/cogl/cogl/cogl-framebuffer.c
@@ -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:
diff --git a/cogl/cogl/cogl-object-private.h b/cogl/cogl/cogl-object-private.h
index 57760bb8c..b33adddfb 100644
--- a/cogl/cogl/cogl-object-private.h
+++ b/cogl/cogl/cogl-object-private.h
@@ -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)
 
diff --git a/cogl/cogl/cogl-offscreen.h b/cogl/cogl/cogl-offscreen.h
index 461b364f0..ba372c24b 100644
--- a/cogl/cogl/cogl-offscreen.h
+++ b/cogl/cogl/cogl-offscreen.h
@@ -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)
  */
diff --git a/cogl/cogl/deprecated/cogl-program.c b/cogl/cogl/deprecated/cogl-program.c
index f68bc3a49..d4d1cdd99 100644
--- a/cogl/cogl/deprecated/cogl-program.c
+++ b/cogl/cogl/deprecated/cogl-program.c
@@ -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
diff --git a/cogl/cogl/deprecated/cogl-shader.c b/cogl/cogl/deprecated/cogl-shader.c
index 7f105f4ef..05f46e751 100644
--- a/cogl/cogl/deprecated/cogl-shader.c
+++ b/cogl/cogl/deprecated/cogl-shader.c
@@ -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
diff --git a/cogl/cogl/deprecated/cogl-shader.h b/cogl/cogl/deprecated/cogl-shader.h
index 2b4167ee0..65f8792d9 100644
--- a/cogl/cogl/deprecated/cogl-shader.h
+++ b/cogl/cogl/deprecated/cogl-shader.h
@@ -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
diff --git a/cogl/cogl/deprecated/cogl-vertex-buffer.c b/cogl/cogl/deprecated/cogl-vertex-buffer.c
index 24859a30c..e1ce7dd3d 100644
--- a/cogl/cogl/deprecated/cogl-vertex-buffer.c
+++ b/cogl/cogl/deprecated/cogl-vertex-buffer.c
@@ -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
diff --git a/cogl/cogl/deprecated/cogl-vertex-buffer.h b/cogl/cogl/deprecated/cogl-vertex-buffer.h
index 44998565b..cf440cb1a 100644
--- a/cogl/cogl/deprecated/cogl-vertex-buffer.h
+++ b/cogl/cogl/deprecated/cogl-vertex-buffer.h
@@ -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.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]