mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
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)
This commit is contained in:
parent
0ffad6ba20
commit
1161870670
@ -35,12 +35,9 @@ G_BEGIN_DECLS
|
|||||||
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_MATRICES))) \
|
if (G_UNLIKELY (COGL_DEBUG_ENABLED (COGL_DEBUG_MATRICES))) \
|
||||||
{ \
|
{ \
|
||||||
g_print ("%s:\n", G_STRFUNC); \
|
g_print ("%s:\n", G_STRFUNC); \
|
||||||
_cogl_matrix_print (MATRIX); \
|
cogl_debug_matrix_print (MATRIX); \
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
_cogl_matrix_print (const CoglMatrix *matrix);
|
|
||||||
|
|
||||||
void
|
void
|
||||||
_cogl_matrix_prefix_print (const char *prefix, const CoglMatrix *matrix);
|
_cogl_matrix_prefix_print (const char *prefix, const CoglMatrix *matrix);
|
||||||
|
|
||||||
|
@ -398,7 +398,7 @@ _cogl_matrix_prefix_print (const char *prefix, const CoglMatrix *matrix)
|
|||||||
* Dumps the contents of a CoglMatrix structure.
|
* Dumps the contents of a CoglMatrix structure.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
_cogl_matrix_print (const CoglMatrix *matrix)
|
cogl_debug_matrix_print (const CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
_cogl_matrix_prefix_print ("", matrix);
|
_cogl_matrix_prefix_print ("", matrix);
|
||||||
}
|
}
|
||||||
|
@ -762,6 +762,17 @@ cogl_matrix_is_identity (const CoglMatrix *matrix);
|
|||||||
void
|
void
|
||||||
cogl_matrix_transpose (CoglMatrix *matrix);
|
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
|
#ifdef _COGL_SUPPORTS_GTYPE_INTEGRATION
|
||||||
|
|
||||||
#define COGL_GTYPE_TYPE_MATRIX (cogl_gtype_matrix_get_type ())
|
#define COGL_GTYPE_TYPE_MATRIX (cogl_gtype_matrix_get_type ())
|
||||||
|
Loading…
Reference in New Issue
Block a user