Rootless: Pulled in changes from fb{Blt,Fill} into rl{Blt,Fill}
(cherry picked from commit 3f857e129df7ce492191e0c51b8e53eaf6179366) (cherry picked from commit 70374a58937d7a6f01c210bd6ac66cafb63e895a)
This commit is contained in:
parent
ed9524d36e
commit
4e18c62635
|
@ -32,10 +32,22 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stddef.h> /* For NULL */
|
#include <stddef.h> /* For NULL */
|
||||||
|
#include <string.h>
|
||||||
#include "fb.h"
|
#include "fb.h"
|
||||||
#include "rootlessCommon.h"
|
#include "rootlessCommon.h"
|
||||||
#include "rlAccel.h"
|
#include "rlAccel.h"
|
||||||
|
|
||||||
|
#define InitializeShifts(sx,dx,ls,rs) { \
|
||||||
|
if (sx != dx) { \
|
||||||
|
if (sx > dx) { \
|
||||||
|
ls = sx - dx; \
|
||||||
|
rs = FB_UNIT - ls; \
|
||||||
|
} else { \
|
||||||
|
rs = dx - sx; \
|
||||||
|
ls = FB_UNIT - rs; \
|
||||||
|
} \
|
||||||
|
} \
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
rlBlt (FbBits *srcLine,
|
rlBlt (FbBits *srcLine,
|
||||||
|
@ -74,6 +86,29 @@ rlBlt (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)
|
||||||
|
@ -326,8 +361,11 @@ rlBlt (FbBits *srcLine,
|
||||||
if (startmask)
|
if (startmask)
|
||||||
{
|
{
|
||||||
bits = FbScrLeft(bits1, leftShift);
|
bits = FbScrLeft(bits1, leftShift);
|
||||||
bits1 = *src++;
|
if (FbScrLeft(startmask, rightShift))
|
||||||
bits |= FbScrRight(bits1, rightShift);
|
{
|
||||||
|
bits1 = *src++;
|
||||||
|
bits |= FbScrRight(bits1, rightShift);
|
||||||
|
}
|
||||||
FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
|
FbDoLeftMaskByteMergeRop (dst, bits, startbyte, startmask);
|
||||||
dst++;
|
dst++;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ rlFill (DrawablePtr pDrawable,
|
||||||
dstBpp,
|
dstBpp,
|
||||||
|
|
||||||
(pGC->patOrg.x + pDrawable->x + dstXoff),
|
(pGC->patOrg.x + pDrawable->x + dstXoff),
|
||||||
pGC->patOrg.y + pDrawable->y + dstYoff - y);
|
pGC->patOrg.y + pDrawable->y - y);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,7 @@ rlFill (DrawablePtr pDrawable,
|
||||||
fgand, fgxor,
|
fgand, fgxor,
|
||||||
bgand, bgxor,
|
bgand, bgxor,
|
||||||
pGC->patOrg.x + pDrawable->x + dstXoff,
|
pGC->patOrg.x + pDrawable->x + dstXoff,
|
||||||
pGC->patOrg.y + pDrawable->y + dstYoff - y);
|
pGC->patOrg.y + pDrawable->y - y);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -154,7 +154,7 @@ rlFill (DrawablePtr pDrawable,
|
||||||
pPriv->pm,
|
pPriv->pm,
|
||||||
dstBpp,
|
dstBpp,
|
||||||
(pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp,
|
(pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp,
|
||||||
pGC->patOrg.y + pDrawable->y + dstYoff - y);
|
pGC->patOrg.y + pDrawable->y - y);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue