A. On Thu, 2011-10-13 at 22:11 +0000, [email protected] wrote:

> Modified: trunk/netsurf/image/nssprite.c
> URL: 
> http://source.netsurf-browser.org/trunk/netsurf/image/nssprite.c?rev=13044&r1=13043&r2=13044&view=diff
> ==============================================================================
> --- trunk/netsurf/image/nssprite.c (original)
> +++ trunk/netsurf/image/nssprite.c Thu Oct 13 17:11:47 2011
> @@ -133,14 +133,12 @@
>       for (uint32_t y = 0; y < sprite->height; y++) {
>               for (uint32_t x = 0; x < sprite->width; x++) {
>                       int offset = 4 * (y * sprite->width + x);
> -                     uint32_t r = imagebuf[offset+3];
> -                     uint32_t g = imagebuf[offset+2];
> -                     uint32_t b = imagebuf[offset+1];
> -                     uint32_t a = imagebuf[offset];
> -                     imagebuf[offset] = r;
> -                     imagebuf[offset+1] = g;
> -                     imagebuf[offset+2] = b;
> -                     imagebuf[offset+3] = a;
> +                     uint32_t rgba = 0;
> +
> +                     rgba |= imagebuf[offset] << 24;
> +                     rgba |= imagebuf[offset + 1] << 16;
> +                     rgba |= imagebuf[offset + 2] << 8;
> +                     rgba |= imagebuf[offset + 3];
>               }
>       }

Is it me or does this loop now do nothing?


J.


Reply via email to