Commit d9b8bfbf authored by Adam Jackson's avatar Adam Jackson 💣

Bug #5478: More use of fbSOlidFillmmx. (Jim Huang)

parent b0e67782
2006-04-03 Adam Jackson <ajax@freedesktop.org>
* fb/fbfill.c:
* fb/fbwindow.c:
Bug #5478: More use of fbSOlidFillmmx. (Jim Huang)
2006-04-03 Adam Jackson <ajax@freedesktop.org>
* fb/fbmmx.c:
......
......@@ -209,7 +209,17 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
if (partY2 <= partY1)
continue;
#ifdef USE_MMX
if (!and && fbHaveMMX())
{
if (fbSolidFillmmx (pDrawable,
partX1, partY1,
(partX2 - partX1), (partY2 - partY1),
xor))
return;
}
#endif
fbSolid (dst + (partY1 + dstYoff) * dstStride,
dstStride,
(partX1 + dstXoff) * dstBpp,
......
/* $XdotOrg: xserver/xorg/fb/fbwindow.c,v 1.9 2005/10/02 08:28:26 anholt Exp $ */
/* $XdotOrg: xserver/xorg/fb/fbwindow.c,v 1.10 2006/02/10 22:00:21 anholt Exp $ */
/*
* Id: fbwindow.c,v 1.1 1999/11/02 03:54:45 keithp Exp $
*
......@@ -217,10 +217,23 @@ fbFillRegionSolid (DrawablePtr pDrawable,
int n = REGION_NUM_RECTS(pRegion);
BoxPtr pbox = REGION_RECTS(pRegion);
#ifdef USE_MMX
int has_mmx = 0;
if (!and && fbHaveMMX())
has_mmx = 1;
#endif
fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff);
while (n--)
{
#ifdef USE_MMX
if (!has_mmx || !fbSolidFillmmx (pDrawable,
pbox->x1,
pbox->y1,
(pbox->x2 - pbox->x1),
(pbox->y2 - pbox->y1), xor)) {
#endif
fbSolid (dst + (pbox->y1 + dstYoff) * dstStride,
dstStride,
(pbox->x1 + dstXoff) * dstBpp,
......@@ -228,6 +241,9 @@ fbFillRegionSolid (DrawablePtr pDrawable,
(pbox->x2 - pbox->x1) * dstBpp,
pbox->y2 - pbox->y1,
and, xor);
#ifdef USE_MMX
}
#endif
fbValidateDrawable (pDrawable);
pbox++;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment