[cogl/wip/cogl-1.14: 2/177] matrix: Add cogl_debug_matrix_print api
- From: Robert Bragg <rbragg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/wip/cogl-1.14: 2/177] matrix: Add cogl_debug_matrix_print api
- Date: Mon, 21 Jan 2013 15:45:06 +0000 (UTC)
commit 11618706701665f3a669fde915c93a1ed310491a
Author: Robert Bragg <robert linux intel com>
Date: Wed Jun 20 15:50:18 2012 +0100
matrix: Add cogl_debug_matrix_print api
As a convenience for debugging this adds a cogl_debug_matrix_print
function that prints out the components of a matrix and any internal
flags associated with the given matrix.
(cherry picked from commit 3b33889ff1204f19347a9548320ba95baa54c18c)
cogl/cogl-matrix-private.h | 5 +----
cogl/cogl-matrix.c | 2 +-
cogl/cogl-matrix.h | 11 +++++++++++
3 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/cogl/cogl-matrix-private.h b/cogl/cogl-matrix-private.h
index ef39e84..7628082 100644
--- a/cogl/cogl-matrix-private.h
+++ b/cogl/cogl-matrix-private.h
@@ -35,13 +35,10 @@ G_BEGIN_DECLS
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_MATRICES))) \
{ \
g_print ("%s:\n", G_STRFUNC); \
- _cogl_matrix_print (MATRIX); \
+ cogl_debug_matrix_print (MATRIX); \
}
void
-_cogl_matrix_print (const CoglMatrix *matrix);
-
-void
_cogl_matrix_prefix_print (const char *prefix, const CoglMatrix *matrix);
void
diff --git a/cogl/cogl-matrix.c b/cogl/cogl-matrix.c
index 96a2ee9..5c3cb67 100644
--- a/cogl/cogl-matrix.c
+++ b/cogl/cogl-matrix.c
@@ -398,7 +398,7 @@ _cogl_matrix_prefix_print (const char *prefix, const CoglMatrix *matrix)
* Dumps the contents of a CoglMatrix structure.
*/
void
-_cogl_matrix_print (const CoglMatrix *matrix)
+cogl_debug_matrix_print (const CoglMatrix *matrix)
{
_cogl_matrix_prefix_print ("", matrix);
}
diff --git a/cogl/cogl-matrix.h b/cogl/cogl-matrix.h
index 570a23c..c50670e 100644
--- a/cogl/cogl-matrix.h
+++ b/cogl/cogl-matrix.h
@@ -762,6 +762,17 @@ cogl_matrix_is_identity (const CoglMatrix *matrix);
void
cogl_matrix_transpose (CoglMatrix *matrix);
+/**
+ * cogl_debug_matrix_print:
+ * @matrix: A #CoglMatrix
+ *
+ * Prints the contents of a #CoglMatrix to stdout.
+ *
+ * Since: 2.0
+ */
+void
+cogl_debug_matrix_print (const CoglMatrix *matrix);
+
#ifdef _COGL_SUPPORTS_GTYPE_INTEGRATION
#define COGL_GTYPE_TYPE_MATRIX (cogl_gtype_matrix_get_type ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]