From 45f3e15b63e3217ff0cd8e672aa92c459e6ed505 Mon Sep 17 00:00:00 2001 From: Georges Basile Stavracas Neto Date: Thu, 10 Sep 2020 14:43:01 -0300 Subject: [PATCH] cogl/matrix: Check identity using graphene matrices https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1439 --- cogl/cogl/cogl-matrix.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cogl/cogl/cogl-matrix.c b/cogl/cogl/cogl-matrix.c index 6b1040cdb..623a93941 100644 --- a/cogl/cogl/cogl-matrix.c +++ b/cogl/cogl/cogl-matrix.c @@ -988,11 +988,10 @@ cogl_matrix_project_points (const CoglMatrix *matrix, gboolean cogl_matrix_is_identity (const CoglMatrix *matrix) { - if (!(matrix->flags & MAT_DIRTY_TYPE) && - matrix->type == COGL_MATRIX_TYPE_IDENTITY) - return TRUE; - else - return memcmp (matrix, identity, sizeof (float) * 16) == 0; + graphene_matrix_t m; + + cogl_matrix_to_graphene_matrix (matrix, &m); + return graphene_matrix_is_identity (&m); } void