summaryrefslogtreecommitdiff
path: root/gsk/gsktransform.c
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2019-03-22 12:38:36 +0000
committerBenjamin Otte <otte@redhat.com>2019-04-29 02:26:31 +0200
commitf1cadee19613c8fcc0fa7d6b35e017919a2dab82 (patch)
tree0b016537cf8c5d1396e8aa907da5c15a3595dbb6 /gsk/gsktransform.c
parentf6594ff073ba5778a59dad0cc49e5239305b98d5 (diff)
downloadgtk+-f1cadee19613c8fcc0fa7d6b35e017919a2dab82.tar.gz
Use matrix equality in GskTransform
Graphene has new API to check for equality, so we should use it instead of doing a byte-by-byte comparison.
Diffstat (limited to 'gsk/gsktransform.c')
-rw-r--r--gsk/gsktransform.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gsk/gsktransform.c b/gsk/gsktransform.c
index 428132bdfb..ebd9980832 100644
--- a/gsk/gsktransform.c
+++ b/gsk/gsktransform.c
@@ -419,8 +419,10 @@ gsk_matrix_transform_equal (GskTransform *first_transform,
GskMatrixTransform *first = (GskMatrixTransform *) first_transform;
GskMatrixTransform *second = (GskMatrixTransform *) second_transform;
- /* Crude, but better than just returning FALSE */
- return memcmp (&first->matrix, &second->matrix, sizeof (graphene_matrix_t)) == 0;
+ if (graphene_matrix_equal_fast (&first->matrix, &second->matrix))
+ return TRUE;
+
+ return graphene_matrix_equal (&first->matrix, &second->matrix);
}
static const GskTransformClass GSK_TRANSFORM_TRANSFORM_CLASS =