[PATCH v2] Try and get overlapping cases fixed.
Soeren Sandmann
sandmann at cs.au.dk
Fri Jun 3 09:34:51 PDT 2011
Cyril Brulebois <kibi at debian.org> writes:
> diff --git a/fb/fbblt.c b/fb/fbblt.c
> index 38271c0..b6e7785 100644
> --- a/fb/fbblt.c
> +++ b/fb/fbblt.c
> @@ -65,6 +65,7 @@ fbBlt (FbBits *srcLine,
> int n, nmiddle;
> Bool destInvarient;
> int startbyte, endbyte;
> + int careful;
> FbDeclareMergeRop ();
>
> #ifdef FB_24BIT
> @@ -76,7 +77,9 @@ fbBlt (FbBits *srcLine,
> }
> #endif
>
> - if (alu == GXcopy && pm == FB_ALLONES && !reverse &&
> + careful = (width * (bpp / 8) > abs(srcLine-dstLine)) || (bpp % 8);
> +
> + if (alu == GXcopy && pm == FB_ALLONES && !careful &&
> !(srcX & 7) && !(dstX & 7) && !(width & 7)) {
> int i;
> CARD8 *src = (CARD8 *) srcLine;
Isn't there still a problem here, where "srcLine-dstLine" is number of
uint32_t's, whereas "width * (bpp / 8)" is number of bytes?
Soren
More information about the xorg-devel
mailing list