diff options
author | Søren Sandmann Pedersen <sandmann@redhat.com> | 2009-09-18 08:16:56 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <sandmann@redhat.com> | 2009-09-24 07:54:37 -0400 |
commit | e156964d3e005be3dbc9ff80580d98c6dd617afd (patch) | |
tree | 61583708c797ded3351b3005bb413738d2724c5c /test | |
parent | eb72bfb97d10283964c070f0a0e26f0520a22ff3 (diff) |
Fix bug in blitters-test with BGRA formats.
When masking out the x bits, blitter-test would make the incorrect
assumption that the they were always in the topmost position. This is
not correct for formats of type PIXMAN_TYPE_BGRA.
Diffstat (limited to 'test')
-rw-r--r-- | test/blitters-test.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/blitters-test.c b/test/blitters-test.c index 23de6c2f..6e1c5de3 100644 --- a/test/blitters-test.c +++ b/test/blitters-test.c @@ -314,6 +314,9 @@ free_random_image (uint32_t initcrc, uint32_t *data = pixman_image_get_data (img); uint32_t mask = (1 << PIXMAN_FORMAT_DEPTH (fmt)) - 1; + if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA) + mask <<= (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt)); + for (i = 0; i < 32; i++) mask |= mask << (i * PIXMAN_FORMAT_BPP (fmt)); |