[Spice-commits] common/pixman_utils.c

Alexander Larsson alexl at kemper.freedesktop.org
Mon Mar 8 10:43:11 PST 2010


 common/pixman_utils.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 04b35fe7ff6b09885a2af9ef8627b45b892e3fb0
Author: Alexander Larsson <alexl at redhat.com>
Date:   Mon Mar 8 19:41:34 2010 +0100

    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.

diff --git a/common/pixman_utils.c b/common/pixman_utils.c
index 30e8919..7aff30b 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++;


More information about the Spice-commits mailing list