summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2006-04-03 21:16:30 +0000
committerAdam Jackson <ajax@nwnk.net>2006-04-03 21:16:30 +0000
commitd9b8bfbfafe8758ceb629606607e37546d51ca52 (patch)
treec1c3d8ac9dcc30d3500fbddd570e40d744685185
parentb0e67782653033c6518944adfbf23e466bd8bc39 (diff)
Bug #5478: More use of fbSOlidFillmmx. (Jim Huang)
-rw-r--r--ChangeLog6
-rw-r--r--fb/fbfill.c12
-rw-r--r--fb/fbwindow.c18
3 files changed, 34 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 8a5f9951a..fa26a154a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
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:
Bug #6346: Build fix when using gcc -mno-sse. (Jonathan
Adamczewski)
diff --git a/fb/fbfill.c b/fb/fbfill.c
index c61ff3b4c..678c7f927 100644
--- a/fb/fbfill.c
+++ b/fb/fbfill.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,
diff --git a/fb/fbwindow.c b/fb/fbwindow.c
index d4046b5f1..4c1c5463d 100644
--- a/fb/fbwindow.c
+++ b/fb/fbwindow.c
@@ -1,4 +1,4 @@
-/* $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++;
}