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:
679c2da
)
Fix shift bug in fetch_scanline/pixel_a2b2g2r2()
author
Søren Sandmann Pedersen
<sandmann@redhat.com>
Fri, 18 Sep 2009 12:48:04 +0000
(08:48 -0400)
committer
Søren Sandmann Pedersen
<sandmann@redhat.com>
Thu, 24 Sep 2009 11:30:38 +0000
(07:30 -0400)
0x30 * 0x55 is 0xff0, so the red channel should be shifted four bits,
not six.
pixman/pixman-access.c
patch
|
blob
|
history
diff --git
a/pixman/pixman-access.c
b/pixman/pixman-access.c
index
41cd1b6
..
06b8411
100644
(file)
--- a/
pixman/pixman-access.c
+++ b/
pixman/pixman-access.c
@@
-798,7
+798,7
@@
fetch_scanline_a2b2g2r2 (pixman_image_t *image,
uint32_t a, r, g, b;
a = ((p & 0xc0) * 0x55) << 18;
- b = ((p & 0x30) * 0x55) >>
6
;
+ b = ((p & 0x30) * 0x55) >>
4
;
g = ((p & 0x0c) * 0x55) << 6;
r = ((p & 0x03) * 0x55) << 16;
@@
-1594,7
+1594,7
@@
fetch_pixel_a2b2g2r2 (bits_image_t *image,
uint32_t a, r, g, b;
a = ((pixel & 0xc0) * 0x55) << 18;
- b = ((pixel & 0x30) * 0x55) >>
6
;
+ b = ((pixel & 0x30) * 0x55) >>
4
;
g = ((pixel & 0x0c) * 0x55) << 6;
r = ((pixel & 0x03) * 0x55) << 16;