Fix bugs in pixman-image.c
authorSøren Sandmann Pedersen <ssp@redhat.com>
Fri, 21 Sep 2012 01:43:24 +0000 (21:43 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sun, 23 Sep 2012 03:41:19 +0000 (23:41 -0400)
In the checks for whether the transforms are rotation matrices "-1"
and "1" were used instead of the correct -pixman_fixed_1 and
pixman_fixed_1.

Fixes test suite failure for rotate-test.

pixman/pixman-image.c

index 15597bd..d9c3034 100644 (file)
@@ -301,9 +301,9 @@ compute_image_info (pixman_image_t *image)
                pixman_fixed_t m01 = image->common.transform->matrix[0][1];
                pixman_fixed_t m10 = image->common.transform->matrix[1][0];
 
-               if (m01 == -1 && m10 == 1)
+               if (m01 == -pixman_fixed_1 && m10 == pixman_fixed_1)
                    flags |= FAST_PATH_ROTATE_90_TRANSFORM;
-               else if (m01 == 1 && m10 == -1)
+               else if (m01 == pixman_fixed_1 && m10 == -pixman_fixed_1)
                    flags |= FAST_PATH_ROTATE_270_TRANSFORM;
            }
        }