From 451a0510324491e82269d8e0d997ee4707ba8df8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=B8ren=20Sandmann=20Pedersen?= Date: Fri, 15 Jun 2007 14:33:57 -0400 Subject: [PATCH] When setting identity transformations store them as NULL to prevent hitting the general compositing code. --- pixman/pixman-image.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c index 8657c31..c08e8fc 100644 --- a/pixman/pixman-image.c +++ b/pixman/pixman-image.c @@ -371,11 +371,25 @@ pixman_bool_t pixman_image_set_transform (pixman_image_t *image, const pixman_transform_t *transform) { + static const pixman_transform_t id = + { + { { pixman_fixed_1, 0, 0 }, + { 0, pixman_fixed_1, 0 }, + { 0, 0, pixman_fixed_1 } + } + }; + image_common_t *common = (image_common_t *)image; if (common->transform == transform) return TRUE; + if (memcmp (&id, transform, sizeof (pixman_transform_t)) == 0) + { + transform = NULL; + return TRUE; + } + if (common->transform) free (common->transform); -- 2.7.4