[Cogl] [PATCH] atlas-texture: use COGL_TEXTURE_DEFINE macro

Robert Bragg robert at sixbynine.org
Fri Sep 6 10:27:51 PDT 2013


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

It was an oversight when making the CoglAtlasTexture api public that we
continued to use the COGL_TEXTURE_INTERNAL_DEFINE macro. This updates
the code to now use COGL_TEXTURE_DEFINE which means the
cogl_is_atlas_texture() function will now be exported in the public api.
---
 cogl/cogl-atlas-texture.c |  2 +-
 cogl/cogl-atlas-texture.h | 15 +++++++++++++++
 2 files changed, 16 insertions(+), 1 deletion(-)

diff --git a/cogl/cogl-atlas-texture.c b/cogl/cogl-atlas-texture.c
index 4542cb3..98d61ca 100644
--- a/cogl/cogl-atlas-texture.c
+++ b/cogl/cogl-atlas-texture.c
@@ -50,7 +50,7 @@
 
 static void _cogl_atlas_texture_free (CoglAtlasTexture *sub_tex);
 
-COGL_TEXTURE_INTERNAL_DEFINE (AtlasTexture, atlas_texture);
+COGL_TEXTURE_DEFINE (AtlasTexture, atlas_texture);
 
 static const CoglTextureVtable cogl_atlas_texture_vtable;
 
diff --git a/cogl/cogl-atlas-texture.h b/cogl/cogl-atlas-texture.h
index 5745cca..9860c5d 100644
--- a/cogl/cogl-atlas-texture.h
+++ b/cogl/cogl-atlas-texture.h
@@ -209,6 +209,21 @@ cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp,
                                     CoglPixelFormat internal_format,
                                     CoglError **error);
 
+/**
+ * cogl_is_atlas_texture:
+ * @object: a #CoglObject
+ *
+ * Checks whether the given object references a #CoglAtlasTexture
+ *
+ * Return value: %TRUE if the passed object represents an atlas
+ *   texture and %FALSE otherwise
+ *
+ * Since: 1.16
+ * Stability: Unstable
+ */
+CoglBool
+cogl_is_atlas_texture (void *object);
+
 COGL_END_DECLS
 
 #endif /* _COGL_ATLAS_TEXTURE_H_ */
-- 
1.8.3.1



More information about the Cogl mailing list