summaryrefslogtreecommitdiff
path: root/fb/fbfill.c
diff options
context:
space:
mode:
authorAaron Plattner <aplattner@nvidia.com>2006-07-10 18:58:09 -0700
committerAaron Plattner <aplattner@nvidia.com>2006-07-26 15:48:51 -0700
commita4005c15fbb48231cb958c32b2c791a2d23a135a (patch)
tree247ce0d86b1f62e69f188ff352cd424bd032284b /fb/fbfill.c
parent319efac445cebda5a2ac1db67efebe54bc47ba9d (diff)
Add framebuffer access wrapper infrastructure.
Create fbPrepareAccess macros to call into the driver to set up the wfbReadMemory and wfbWriteWemory pointers. Call these from fbGetDrawable and fbGetStipDrawable. Add the READ and WRITE macros, which expand to simple memory accesses for fb, and calls through the function pointers for wfb. Add fbFinishAccess macro to give the driver an opportunity to clean up. Add calls to this in the appropriate places.
Diffstat (limited to 'fb/fbfill.c')
-rw-r--r--fb/fbfill.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/fb/fbfill.c b/fb/fbfill.c
index ad5025c84..7ef3a70f9 100644
--- a/fb/fbfill.c
+++ b/fb/fbfill.c
@@ -49,8 +49,10 @@ fbFill (DrawablePtr pDrawable,
case FillSolid:
#ifdef USE_MMX
if (!pPriv->and && fbHaveMMX())
- if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor))
+ if (fbSolidFillmmx (pDrawable, x, y, width, height, pPriv->xor)) {
+ fbFinishAccess (pDrawable);
return;
+ }
#endif
fbSolid (dst + (y + dstYoff) * dstStride,
dstStride,
@@ -92,6 +94,7 @@ fbFill (DrawablePtr pDrawable,
(pGC->patOrg.x + pDrawable->x + dstXoff),
pGC->patOrg.y + pDrawable->y - y);
+ fbFinishAccess (&pStip->drawable);
}
else
{
@@ -129,6 +132,7 @@ fbFill (DrawablePtr pDrawable,
bgand, bgxor,
pGC->patOrg.x + pDrawable->x + dstXoff,
pGC->patOrg.y + pDrawable->y - y);
+ fbFinishAccess (&pStip->drawable);
}
break;
}
@@ -157,10 +161,12 @@ fbFill (DrawablePtr pDrawable,
dstBpp,
(pGC->patOrg.x + pDrawable->x + dstXoff) * dstBpp,
pGC->patOrg.y + pDrawable->y - y);
+ fbFinishAccess (&pTile->drawable);
break;
}
}
fbValidateDrawable (pDrawable);
+ fbFinishAccess (pDrawable);
}
void
@@ -215,8 +221,10 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
if (fbSolidFillmmx (pDrawable,
partX1, partY1,
(partX2 - partX1), (partY2 - partY1),
- xor))
+ xor)) {
+ fbFinishAccess (pDrawable);
return;
+ }
}
#endif
fbSolid (dst + (partY1 + dstYoff) * dstStride,
@@ -228,4 +236,5 @@ fbSolidBoxClipped (DrawablePtr pDrawable,
(partY2 - partY1),
and, xor);
}
+ fbFinishAccess (pDrawable);
}