_mm_empty();
}
-#if 0
-/* FIXME */
-
-Bool
-fbCopyAreammx (DrawablePtr pSrc,
- DrawablePtr pDst,
- int src_x,
- int src_y,
- int dst_x,
- int dst_y,
- int width,
- int height)
-{
- uint32_t * src_bits;
- int src_stride;
- int src_bpp;
- int src_xoff;
- int src_yoff;
-
- uint32_t * dst_bits;
- int dst_stride;
- int dst_bpp;
- int dst_xoff;
- int dst_yoff;
-
+pixman_bool_t
+pixman_blt_mmx (uint32_t *src_bits,
+ uint32_t *dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x, int src_y,
+ int dst_x, int dst_y,
+ int width, int height)
+{
uint8_t * src_bytes;
uint8_t * dst_bytes;
int byte_width;
- fbGetDrawable(pSrc, src_bits, src_stride, src_bpp, src_xoff, src_yoff);
- fbGetDrawable(pDst, dst_bits, dst_stride, dst_bpp, dst_xoff, dst_yoff);
-
if (src_bpp != dst_bpp)
return FALSE;
{
src_stride = src_stride * sizeof (uint32_t) / 2;
dst_stride = dst_stride * sizeof (uint32_t) / 2;
- src_bytes = (uint8_t *)(((uint16_t *)src_bits) + src_stride * (src_y + src_yoff) + (src_x + src_xoff));
- dst_bytes = (uint8_t *)(((uint16_t *)dst_bits) + dst_stride * (dst_y + dst_yoff) + (dst_x + dst_xoff));
+ src_bytes = (uint8_t *)(((uint16_t *)src_bits) + src_stride * (src_y) + (src_x));
+ dst_bytes = (uint8_t *)(((uint16_t *)dst_bits) + dst_stride * (dst_y) + (dst_x));
byte_width = 2 * width;
src_stride *= 2;
dst_stride *= 2;
} else if (src_bpp == 32) {
src_stride = src_stride * sizeof (uint32_t) / 4;
dst_stride = dst_stride * sizeof (uint32_t) / 4;
- src_bytes = (uint8_t *)(((uint32_t *)src_bits) + src_stride * (src_y + src_yoff) + (src_x + src_xoff));
- dst_bytes = (uint8_t *)(((uint32_t *)dst_bits) + dst_stride * (dst_y + dst_yoff) + (dst_x + dst_xoff));
+ src_bytes = (uint8_t *)(((uint32_t *)src_bits) + src_stride * (src_y) + (src_x));
+ dst_bytes = (uint8_t *)(((uint32_t *)dst_bits) + dst_stride * (dst_y) + (dst_x));
byte_width = 4 * width;
src_stride *= 4;
dst_stride *= 4;
}
_mm_empty();
+
return TRUE;
}
-#endif
-#if 0
-/* FIXME */
void
-fbCompositeCopyAreammx (uint8_t op,
+fbCompositeCopyAreammx (pixman_op_t op,
pixman_image_t * pSrc,
pixman_image_t * pMask,
pixman_image_t * pDst,
uint16_t width,
uint16_t height)
{
- fbCopyAreammx (pSrc->pDrawable,
- pDst->pDrawable,
- xSrc, ySrc,
- xDst, yDst,
- width, height);
+ pixman_blt_mmx (pSrc->bits.bits,
+ pDst->bits.bits,
+ pSrc->bits.rowstride,
+ pDst->bits.rowstride,
+ PIXMAN_FORMAT_BPP (pSrc->bits.format),
+ PIXMAN_FORMAT_BPP (pDst->bits.format),
+ xSrc, ySrc, xDst, yDst, width, height);
}
-#endif
-
-
-
#endif /* USE_MMX */
#ifdef USE_MMX
if (fbHaveMMX() &&
(pSrc->bits.format == PIXMAN_x8r8g8b8 || pSrc->bits.format == PIXMAN_x8b8g8r8))
-#if 0
- /* FIXME */
-
- func = fbCompositeCopyAreammx
-#endif
- ;
+ func = fbCompositeCopyAreammx;
else
#endif
#if 0
case PIXMAN_x8r8g8b8:
#ifdef USE_MMX
if (fbHaveMMX())
-#if 0
- /* FIXME */
- func = fbCompositeCopyAreammx
-#endif
- ;
+ func = fbCompositeCopyAreammx;
#endif
break;
default:
case PIXMAN_x8b8g8r8:
#ifdef USE_MMX
if (fbHaveMMX())
-#if 0
- /* FIXME */
- func = fbCompositeCopyAreammx
-#endif
- ;
+ func = fbCompositeCopyAreammx;
#endif
break;
default:
if (pSrc->bits.bits != pDst->bits.bits && fbHaveMMX() &&
(PIXMAN_FORMAT_BPP (pSrc->bits.format) == 16 ||
PIXMAN_FORMAT_BPP (pSrc->bits.format) == 32))
-#if 0
- /* FIXME */
- func = fbCompositeCopyAreammx
-#endif
- ;
+ func = fbCompositeCopyAreammx;
else
#endif
/* FIXME */
*vector = result;
return TRUE;
}
+
+pixman_bool_t
+pixman_blt (uint32_t *src_bits,
+ uint32_t *dst_bits,
+ int src_stride,
+ int dst_stride,
+ int src_bpp,
+ int dst_bpp,
+ int src_x, int src_y,
+ int dst_x, int dst_y,
+ int width, int height)
+{
+#ifdef USE_MMX
+ return pixman_blt_mmx (src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
+ src_x, src_y, dst_x, dst_y, width, height);
+#else
+ return FALSE;
+#endif
+}