aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/fb/fbblt.c
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/programs/Xserver/fb/fbblt.c')
-rw-r--r--nx-X11/programs/Xserver/fb/fbblt.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/fb/fbblt.c b/nx-X11/programs/Xserver/fb/fbblt.c
index 085a8e639..e820a85eb 100644
--- a/nx-X11/programs/Xserver/fb/fbblt.c
+++ b/nx-X11/programs/Xserver/fb/fbblt.c
@@ -26,6 +26,7 @@
#include <dix-config.h>
#endif
+#include <string.h>
#include "fb.h"
#define InitializeShifts(sx,dx,ls,rs) { \
@@ -76,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)