xorg server fbcompose bug

Eric Anholt eric at anholt.net
Sun Oct 19 12:13:38 PDT 2008


On Sun, 2008-10-19 at 19:50 +0200, Petr Kobalíček wrote:
> Hi developer,
> 
> I found bug in xorg framebuffer implementation in file fbcompose.c,
> function fbFetch_b8g8r8():

It looks like your change is adding the line
         *buffer++ = b;
That bug was fixed a year and a half ago as far as I can see.

If you can submit diff -u output it makes it easier for people to find
what you're proposing.

> The body of function is:
> 
> static FASTCALL void
> fbFetch_b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer,
> miIndexedPtr indexed)
> {
>     const CARD8 *pixel = (const CARD8 *)bits + 3*x;
>     const CARD8 *end = pixel + 3*width;
>     while (pixel < end) {
>         CARD32 b = 0xff000000;
> #if IMAGE_BYTE_ORDER == MSBFirst
>         b |= (*pixel++);
>         b |= (*pixel++ << 8);
>         b |= (*pixel++ << 16);
> #else
>         b |= (*pixel++ << 16);
>         b |= (*pixel++ << 8);
>         b |= (*pixel++);
> #endif
>     }
> }
> 
> But it should be:
> 
> static FASTCALL void
> fbFetch_b8g8r8 (const FbBits *bits, int x, int width, CARD32 *buffer,
> miIndexedPtr indexed)
> {
>     const CARD8 *pixel = (const CARD8 *)bits + 3*x;
>     const CARD8 *end = pixel + 3*width;
>     while (pixel < end) {
>         CARD32 b = 0xff000000;
> #if IMAGE_BYTE_ORDER == MSBFirst
>         b |= (*pixel++);
>         b |= (*pixel++ << 8);
>         b |= (*pixel++ << 16);
> #else
>         b |= (*pixel++ << 16);
>         b |= (*pixel++ << 8);
>         b |= (*pixel++);
> #endif
>         *buffer++ = b;
>     }
> }
> 
> This bug is also in cairo, should I contact them too or it's
> synchronized (the code base is the same) ?
> 
> Cheers
> - Petr Kobalicek
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg
-- 
Eric Anholt
eric at anholt.net                         eric.anholt at intel.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20081019/629e12f1/attachment.pgp>


More information about the xorg mailing list