summaryrefslogtreecommitdiff
path: root/fb/fbgc.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/fbgc.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/fbgc.c')
-rw-r--r--fb/fbgc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/fb/fbgc.c b/fb/fbgc.c
index 5b5581093..1aca17c7c 100644
--- a/fb/fbgc.c
+++ b/fb/fbgc.c
@@ -116,6 +116,8 @@ fbPadPixmap (PixmapPtr pPixmap)
*bits = b;
bits += stride;
}
+
+ fbFinishAccess (&pPixmap->drawable);
}
/*
@@ -183,10 +185,13 @@ fbCanEvenStipple (PixmapPtr pStipple, int bpp)
/* check to see that the stipple repeats horizontally */
while (h--)
{
- if (!fbLineRepeat (bits, len, pStipple->drawable.width))
+ if (!fbLineRepeat (bits, len, pStipple->drawable.width)) {
+ fbFinishAccess (&pStipple->drawable);
return FALSE;
+ }
bits += stride;
}
+ fbFinishAccess (&pStipple->drawable);
return TRUE;
}