From: Søren Sandmann Pedersen Date: Fri, 15 Jun 2007 18:33:57 +0000 (-0400) Subject: When setting identity transformations store them as NULL to prevent X-Git-Tag: 1.0_branch~1490 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=451a0510324491e82269d8e0d997ee4707ba8df8;p=profile%2Fivi%2Fpixman.git When setting identity transformations store them as NULL to prevent hitting the general compositing code. --- 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);