[mutter/gbsneto/graphene-matrix: 16/57] cogl/matrix: Check identity using graphene matrices
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/graphene-matrix: 16/57] cogl/matrix: Check identity using graphene matrices
- Date: Thu, 24 Sep 2020 11:43:34 +0000 (UTC)
commit 25385c48da25a19b9ab75e5746e0887a586557d1
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Sep 10 14:43:01 2020 -0300
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 110a08f0e1..f793e6eaa4 100644
--- a/cogl/cogl/cogl-matrix.c
+++ b/cogl/cogl/cogl-matrix.c
@@ -979,11 +979,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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]