xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Thu Dec 2 07:38:59 PST 2010


 render/render.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dab064fa5e0b1f5c67222562ad5367005832cba1
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Tue Nov 2 20:10:32 2010 +0100

    render: Fix byteswapping of gradient stops
    
    The function swapStops repeatedly swaps the color components as
    CARD16, but incorrectly steps over them as if they were CARD32.
    
    This causes half of the stops not to be swapped at all and some
    unrelated data be swapped instead.
    
    Signed-off-by: Andrea Canciani <ranma42 at gmail.com>
    Reviewed-by: Soren Sandmann <sandmann at daimi.au.dk>
    Reviewed-by: Julien Cristau <jcristau at debian.org>
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/render/render.c b/render/render.c
index 00241f9..85a4392 100644
--- a/render/render.c
+++ b/render/render.c
@@ -2552,8 +2552,8 @@ static void swapStops(void *stuff, int num)
     }
     colors = (CARD16 *)(stops);
     for (i = 0; i < 4*num; ++i) {
-        swaps(stops, n);
-        ++stops;
+        swaps(colors, n);
+        ++colors;
     }
 }
 


More information about the xorg-commit mailing list