#include <string.h>
#include "pixman-private.h"
#include "pixman-combine32.h"
-#define FbFullMask(n) \
- ((n) == 32 ? (uint32_t)-1 : ((((uint32_t) 1) << n) - 1))
static force_inline uint32_t
fbOver (uint32_t src, uint32_t dest)
int32_t height)
{
uint32_t src, srca;
- uint8_t *dstLine, *dst, dstMask;
+ uint8_t *dstLine, *dst;
uint8_t *maskLine, *mask, m;
int dstStride, maskStride;
uint16_t w;
fbComposeGetSolid(iSrc, src, iDst->bits.format);
- dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (iDst->bits.format));
srca = src >> 24;
fbComposeGetStart (iDst, xDst, yDst, uint8_t, dstStride, dstLine, 1);
int32_t height)
{
uint32_t src, srca;
- uint32_t *dstLine, *dst, d, dstMask;
+ uint32_t *dstLine, *dst, d;
uint8_t *maskLine, *mask, m;
int dstStride, maskStride;
uint16_t w;
fbComposeGetSolid(pSrc, src, pDst->bits.format);
- dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (pDst->bits.format));
srca = src >> 24;
if (src == 0)
return;
if (m == 0xff)
{
if (srca == 0xff)
- *dst = src & dstMask;
+ *dst = src;
else
- *dst = fbOver (src, *dst) & dstMask;
+ *dst = fbOver (src, *dst);
}
else if (m)
{
d = fbIn (src, m);
- *dst = fbOver (d, *dst) & dstMask;
+ *dst = fbOver (d, *dst);
}
dst++;
}
int32_t height)
{
uint32_t src, srca;
- uint32_t *dstLine, *dst, d, dstMask;
+ uint32_t *dstLine, *dst, d;
uint32_t *maskLine, *mask, ma;
int dstStride, maskStride;
uint16_t w;
fbComposeGetSolid(pSrc, src, pDst->bits.format);
- dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (pDst->bits.format));
srca = src >> 24;
if (src == 0)
return;
if (ma == 0xffffffff)
{
if (srca == 0xff)
- *dst = src & dstMask;
+ *dst = src;
else
- *dst = fbOver (src, *dst) & dstMask;
+ *dst = fbOver (src, *dst);
}
else if (ma)
{
int32_t width,
int32_t height)
{
- uint32_t *dstLine, *dst, dstMask;
+ uint32_t *dstLine, *dst;
uint32_t *srcLine, *src, s;
int dstStride, srcStride;
uint8_t a;
fbComposeGetStart (pDst, xDst, yDst, uint32_t, dstStride, dstLine, 1);
fbComposeGetStart (pSrc, xSrc, ySrc, uint32_t, srcStride, srcLine, 1);
- dstMask = FbFullMask (PIXMAN_FORMAT_DEPTH (pDst->bits.format));
-
while (height--)
{
dst = dstLine;
s = *src++;
a = s >> 24;
if (a == 0xff)
- *dst = s & dstMask;
+ *dst = s;
else if (s)
- *dst = fbOver (s, *dst) & dstMask;
+ *dst = fbOver (s, *dst);
dst++;
}
}