summaryrefslogtreecommitdiff
path: root/xserver/fb/fbblt.c
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2011-11-05 13:32:59 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2011-11-05 13:32:59 +0000
commitbf781c5ff285301ad70ffc5f4321b8906f71edd8 (patch)
tree3b770f4bf9a8cd11dd9f14e7f758991a73a52d78 /xserver/fb/fbblt.c
parente59d0622d3162f7b5a7420ef87dbebb200348c37 (diff)
Update to xserver 1.11.2
Diffstat (limited to 'xserver/fb/fbblt.c')
-rw-r--r--xserver/fb/fbblt.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/xserver/fb/fbblt.c b/xserver/fb/fbblt.c
index 38271c0c9..680940467 100644
--- a/xserver/fb/fbblt.c
+++ b/xserver/fb/fbblt.c
@@ -65,23 +65,26 @@ fbBlt (FbBits *srcLine,
int n, nmiddle;
Bool destInvarient;
int startbyte, endbyte;
+ int careful;
FbDeclareMergeRop ();
-#ifdef FB_24BIT
if (bpp == 24 && !FbCheck24Pix (pm))
{
fbBlt24 (srcLine, srcStride, srcX, dstLine, dstStride, dstX,
width, height, alu, pm, reverse, upsidedown);
return;
}
-#endif
- 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;
@@ -338,7 +341,6 @@ fbBlt (FbBits *srcLine,
}
}
-#ifdef FB_24BIT
#undef DEBUG_BLT24
#ifdef DEBUG_BLT24
@@ -603,7 +605,6 @@ fbBlt24 (FbBits *srcLine,
ErrorF ("\n");
#endif
}
-#endif /* FB_24BIT */
#if FB_SHIFT == FB_STIP_SHIFT + 1
@@ -784,7 +785,6 @@ fbBltOdd (FbBits *srcLine,
}
}
-#ifdef FB_24BIT
void
fbBltOdd24 (FbBits *srcLine,
FbStride srcStrideEven,
@@ -826,7 +826,6 @@ fbBltOdd24 (FbBits *srcLine,
}
}
}
-#endif
#endif
@@ -915,7 +914,6 @@ fbBltStip (FbStip *src,
&dstStrideEven, &dstStrideOdd,
&dstXEven, &dstXOdd);
-#ifdef FB_24BIT
if (bpp == 24 && !FbCheck24Pix (pm))
{
fbBltOdd24 (s, srcStrideEven, srcStrideOdd,
@@ -927,7 +925,6 @@ fbBltStip (FbStip *src,
width, height, alu, pm);
}
else
-#endif
{
fbBltOdd (s, srcStrideEven, srcStrideOdd,
srcXEven, srcXOdd,