aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/fb/fbblt.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/fb/fbblt.c')
-rw-r--r--xorg-server/fb/fbblt.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/xorg-server/fb/fbblt.c b/xorg-server/fb/fbblt.c
index a0402986c..680940467 100644
--- a/xorg-server/fb/fbblt.c
+++ b/xorg-server/fb/fbblt.c
@@ -65,6 +65,7 @@ fbBlt (FbBits *srcLine,
int n, nmiddle;
Bool destInvarient;
int startbyte, endbyte;
+ int careful;
FbDeclareMergeRop ();
if (bpp == 24 && !FbCheck24Pix (pm))
@@ -74,12 +75,16 @@ fbBlt (FbBits *srcLine,
return;
}
- if (alu == GXcopy && pm == FB_ALLONES && !reverse &&
+ careful = !((srcLine < dstLine && srcLine + width * (bpp>>3) > dstLine) ||
+ (dstLine < srcLine && dstLine + width * (bpp>>3) > srcLine)) ||
+ (bpp & 7);
+
+ if (alu == GXcopy && pm == FB_ALLONES && !careful &&
!(srcX & 7) && !(dstX & 7) && !(width & 7)) {
int i;
CARD8 *src = (CARD8 *) srcLine;
CARD8 *dst = (CARD8 *) dstLine;
-
+
srcStride *= sizeof(FbBits);
dstStride *= sizeof(FbBits);
width >>= 3;