mirror of
https://github.com/brl/mutter.git
synced 2024-11-22 16:10:41 -05:00
cogl-matrix-stack: Add _cogl_matrix_stack_has_identity_flag
This adds an internal function to quickly determine whether the top of the matrix stack is known to be the identity matrix.
This commit is contained in:
parent
c11f72fd6d
commit
35b07f6b83
@ -473,3 +473,9 @@ _cogl_matrix_stack_get_age (CoglMatrixStack *stack)
|
||||
{
|
||||
return stack->age;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_cogl_matrix_stack_has_identity_flag (CoglMatrixStack *stack)
|
||||
{
|
||||
return _cogl_matrix_stack_top (stack)->is_identity;
|
||||
}
|
||||
|
@ -110,4 +110,11 @@ _cogl_matrix_stack_dirty (CoglMatrixStack *stack);
|
||||
unsigned int
|
||||
_cogl_matrix_stack_get_age (CoglMatrixStack *stack);
|
||||
|
||||
/* If this returns TRUE then the top of the matrix is definitely the
|
||||
identity matrix. If it returns FALSE it may or may not be the
|
||||
identity matrix but no expensive comparison is performed to verify
|
||||
it. */
|
||||
gboolean
|
||||
_cogl_matrix_stack_has_identity_flag (CoglMatrixStack *stack);
|
||||
|
||||
#endif /* __COGL_MATRIX_STACK_H */
|
||||
|
Loading…
Reference in New Issue
Block a user