cogl/matrix: Check identity using graphene matrices
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439
This commit is contained in:
parent
9b65f74eb8
commit
45f3e15b63
@ -988,11 +988,10 @@ cogl_matrix_project_points (const CoglMatrix *matrix,
|
|||||||
gboolean
|
gboolean
|
||||||
cogl_matrix_is_identity (const CoglMatrix *matrix)
|
cogl_matrix_is_identity (const CoglMatrix *matrix)
|
||||||
{
|
{
|
||||||
if (!(matrix->flags & MAT_DIRTY_TYPE) &&
|
graphene_matrix_t m;
|
||||||
matrix->type == COGL_MATRIX_TYPE_IDENTITY)
|
|
||||||
return TRUE;
|
cogl_matrix_to_graphene_matrix (matrix, &m);
|
||||||
else
|
return graphene_matrix_is_identity (&m);
|
||||||
return memcmp (matrix, identity, sizeof (float) * 16) == 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user