forked from AuroraMiddleware/gtk
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.
This commit is contained in:
parent
f6594ff073
commit
f1cadee196
@ -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 =
|
||||
|
Loading…
Reference in New Issue
Block a user