projects
/
platform
/
upstream
/
pixman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eb72bfb
)
Fix bug in blitters-test with BGRA formats.
author
Søren Sandmann Pedersen
<sandmann@redhat.com>
Fri, 18 Sep 2009 12:16:56 +0000
(08:16 -0400)
committer
Søren Sandmann Pedersen
<sandmann@redhat.com>
Thu, 24 Sep 2009 11:54:37 +0000
(07:54 -0400)
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.
test/blitters-test.c
patch
|
blob
|
history
diff --git
a/test/blitters-test.c
b/test/blitters-test.c
index
23de6c2
..
6e1c5de
100644
(file)
--- 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));