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:
parent
e70b64b930
commit
1c3f8727b2
|
@ -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>
|
2006-01-18 Dave Airlie <airlied@linux.ie>
|
||||||
|
|
||||||
Update XGL server from the xserver tree, and fix to work
|
Update XGL server from the xserver tree, and fix to work
|
||||||
|
|
23
fb/fbblt.c
23
fb/fbblt.c
|
@ -77,6 +77,29 @@ fbBlt (FbBits *srcLine,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#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);
|
FbInitializeMergeRop(alu, pm);
|
||||||
destInvarient = FbDestInvarientMergeRop();
|
destInvarient = FbDestInvarientMergeRop();
|
||||||
if (upsidedown)
|
if (upsidedown)
|
||||||
|
|
Loading…
Reference in New Issue