[Cogl] [PATCH] texture: remove deprecated cogl_texture_ref/unref

Robert Bragg robert at sixbynine.org
Tue Aug 28 08:53:00 PDT 2012


From: Robert Bragg <robert at linux.intel.com>

cogl_texture_ref/unref are redundant and their use can be replaced with
cogl_object_ref/unref so this removes the old functions.
---
 cogl/cogl-texture.c |   29 -----------------------------
 cogl/cogl-texture.h |   28 ----------------------------
 cogl/cogl.symbols   |    6 ------
 3 files changed, 0 insertions(+), 63 deletions(-)

diff --git a/cogl/cogl-texture.c b/cogl/cogl-texture.c
index e5fdc70..ab98ca0 100644
--- a/cogl/cogl-texture.c
+++ b/cogl/cogl-texture.c
@@ -97,35 +97,6 @@ cogl_is_texture (void *object)
   return FALSE;
 }
 
-void *
-cogl_texture_ref (void *object)
-{
-  if (!cogl_is_texture (object))
-    return NULL;
-
-  _COGL_OBJECT_DEBUG_REF (CoglTexture, object);
-
-  cogl_object_ref (object);
-
-  return object;
-}
-
-void
-cogl_texture_unref (void *object)
-{
-  if (!cogl_is_texture (object))
-    {
-      g_warning (G_STRINGIFY (cogl_texture_unref)
-                 ": Ignoring unref of CoglObject "
-                 "due to type mismatch");
-      return;
-    }
-
-  _COGL_OBJECT_DEBUG_UNREF (CoglTexture, object);
-
-  cogl_object_unref (object);
-}
-
 void
 _cogl_texture_init (CoglTexture *texture,
                     const CoglTextureVtable *vtable)
diff --git a/cogl/cogl-texture.h b/cogl/cogl-texture.h
index cd65b56..84a7e2f 100644
--- a/cogl/cogl-texture.h
+++ b/cogl/cogl-texture.h
@@ -491,34 +491,6 @@ cogl_texture_new_from_sub_texture (CoglTexture *full_texture,
                                    int sub_width,
                                    int sub_height);
 
-#ifndef COGL_DISABLE_DEPRECATED
-
-/**
- * cogl_texture_ref:
- * @texture: a #CoglTexture.
- *
- * Increment the reference count for a cogl texture.
- *
- * Deprecated: 1.2: Use cogl_object_ref() instead
- *
- * Return value: the @texture pointer.
- */
-void *
-cogl_texture_ref (void *texture) G_GNUC_DEPRECATED;
-
-/**
- * cogl_texture_unref:
- * @texture: a #CoglTexture.
- *
- * Decrement the reference count for a cogl texture.
- *
- * Deprecated: 1.2: Use cogl_object_unref() instead
- */
-void
-cogl_texture_unref (void *texture) G_GNUC_DEPRECATED;
-
-#endif /* COGL_DISABLE_DEPRECATED */
-
 G_END_DECLS
 
 #endif /* __COGL_TEXTURE_H__ */
diff --git a/cogl/cogl.symbols b/cogl/cogl.symbols
index 6ee2ead..e63046f 100644
--- a/cogl/cogl.symbols
+++ b/cogl/cogl.symbols
@@ -595,14 +595,8 @@ cogl_texture_pixmap_x11_update_area
 #endif
 cogl_texture_rectangle_new_from_bitmap
 cogl_texture_rectangle_new_with_size_EXP
-#ifndef COGL_DISABLE_DEPRECATED
-cogl_texture_ref
-#endif
 cogl_texture_set_region
 cogl_texture_set_region_from_bitmap_EXP
-#ifndef COGL_DISABLE_DEPRECATED
-cogl_texture_unref
-#endif
 cogl_texture_2d_new_from_bitmap
 cogl_texture_2d_new_from_data_EXP
 cogl_texture_2d_new_from_foreign_EXP
-- 
1.7.7.6



More information about the Cogl mailing list