More kdrive merge, fast path fbBlt to use memcpy() when possible. Good for

-5% to 60% speedup on XGetImage, and 0% to 10% speedup on copies within
    host memory. Based on work by Jaymz Julian.
This commit is contained in:
Adam Jackson 2006-01-18 19:42:56 +00:00
parent e70b64b930
commit 1c3f8727b2
2 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,10 @@
2006-01-18 Adam Jackson <ajax@freedesktop.org>
* fb/fbblt.c:
More kdrive merge, fast path fbBlt to use memcpy() when possible.
Good for -5% to 60% speedup on XGetImage, and 0% to 10% speedup on
copies within host memory. Based on work by Jaymz Julian.
2006-01-18 Dave Airlie <airlied@linux.ie>
Update XGL server from the xserver tree, and fix to work

View File

@ -77,6 +77,29 @@ fbBlt (FbBits *srcLine,
return;
}
#endif
if (alu == GXcopy && pm == FB_ALLONES && !reverse &&
!(srcX & 7) && !(dstX & 7) && !(width & 7)) {
int i;
CARD8 *src = (CARD8 *) srcLine;
CARD8 *dst = (CARD8 *) dstLine;
srcStride *= sizeof(FbBits);
dstStride *= sizeof(FbBits);
width >>= 3;
src += (srcX >> 3);
dst += (dstX >> 3);
if (!upsidedown)
for (i = 0; i < height; i++)
memcpy(dst + i * dstStride, src + i * srcStride, width);
else
for (i = height - 1; i >= 0; i--)
memcpy(dst + i * dstStride, src + i * srcStride, width);
return;
}
FbInitializeMergeRop(alu, pm);
destInvarient = FbDestInvarientMergeRop();
if (upsidedown)