summaryrefslogtreecommitdiffstats
path: root/common/pixman_utils.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2010-03-08 19:41:34 +0100
committerAlexander Larsson <alexl@redhat.com>2010-03-08 19:41:34 +0100
commit04b35fe7ff6b09885a2af9ef8627b45b892e3fb0 (patch)
treef538c39cb6e830318a60be1aa4f3346296cc1d80 /common/pixman_utils.c
parent4f097150cbf666fe5284e82fd83e820a3549243e (diff)
downloadspice-04b35fe7ff6b09885a2af9ef8627b45b892e3fb0.tar.gz
spice-04b35fe7ff6b09885a2af9ef8627b45b892e3fb0.tar.xz
spice-04b35fe7ff6b09885a2af9ef8627b45b892e3fb0.zip
Fix colorkeying in pixman_utils.c
We were masking out the alpha bit in the key color not int the source pixel, so colorkeying didn't work when the high byte was != 0. For instance in the shutdown dialog in XP.
Diffstat (limited to 'common/pixman_utils.c')
-rw-r--r--common/pixman_utils.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/pixman_utils.c b/common/pixman_utils.c
index 30e89192..7aff30b4 100644
--- a/common/pixman_utils.c
+++ b/common/pixman_utils.c
@@ -816,10 +816,11 @@ void spice_pixman_blit_colorkey (pixman_image_t *dest,
uint32_t *d = (uint32_t *)byte_line;
uint32_t *s = (uint32_t *)byte_line;
+ transparent_color &= 0xffffff;
s = (uint32_t *)src_line;
for (x = 0; x < width; x++) {
uint32_t val = *s;
- if (val != (0xffffff & transparent_color)) {
+ if ((0xffffff & val) != transparent_color) {
*d = val;
}
s++; d++;