From 11d21dbaa3604951f73b641e4d88723696157a8e Mon Sep 17 00:00:00 2001 From: Dan Amelang Date: Tue, 21 Nov 2006 14:50:29 -0800 Subject: [PATCH] Change _cairo_matrix_to_pixman_matrix to use a pixman_transform_t as the template, thus avoiding a forced memcpy --- src/cairo-matrix.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/cairo-matrix.c b/src/cairo-matrix.c index 7f43f23bb..d4f4bf776 100644 --- a/src/cairo-matrix.c +++ b/src/cairo-matrix.c @@ -725,16 +725,14 @@ void _cairo_matrix_to_pixman_matrix (const cairo_matrix_t *matrix, pixman_transform_t *pixman_transform) { - static const pixman_fixed16_16_t pixman_identity_matrix[3][3] = { + static const pixman_transform_t pixman_identity_transform = {{ {1 << 16, 0, 0}, { 0, 1 << 16, 0}, { 0, 0, 1 << 16} - }; + }}; if (_cairo_matrix_is_identity (matrix)) { - memcpy (pixman_transform->matrix, - &pixman_identity_matrix, - sizeof (pixman_identity_matrix)); + *pixman_transform = pixman_identity_transform; } else { pixman_transform->matrix[0][0] = _cairo_fixed_from_double (matrix->xx);