diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2006-07-10 18:58:09 -0700 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2006-07-26 15:48:51 -0700 |
commit | a4005c15fbb48231cb958c32b2c791a2d23a135a (patch) | |
tree | 247ce0d86b1f62e69f188ff352cd424bd032284b /fb/fbglyph.c | |
parent | 319efac445cebda5a2ac1db67efebe54bc47ba9d (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/fbglyph.c')
-rw-r--r-- | fb/fbglyph.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/fb/fbglyph.c b/fb/fbglyph.c index 8e819401b..78e26a993 100644 --- a/fb/fbglyph.c +++ b/fb/fbglyph.c @@ -284,7 +284,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable, glyph = 0; if (pGC->fillStyle == FillSolid && pPriv->and == 0) { - fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dstBpp = pDrawable->bitsPerPixel; switch (dstBpp) { case 8: glyph = fbGlyph8; break; case 16: glyph = fbGlyph16; break; @@ -312,6 +312,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable, if (glyph && gWidth <= sizeof (FbStip) * 8 && fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, @@ -319,6 +320,7 @@ fbPolyGlyphBlt (DrawablePtr pDrawable, pPriv->xor, gx + dstXoff, gHeight); + fbFinishAccess (pDrawable); } else #endif @@ -375,7 +377,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable, glyph = 0; if (pPriv->and == 0) { - fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); + dstBpp = pDrawable->bitsPerPixel; switch (dstBpp) { case 8: glyph = fbGlyph8; break; case 16: glyph = fbGlyph16; break; @@ -443,6 +445,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable, if (glyph && gWidth <= sizeof (FbStip) * 8 && fbGlyphIn (fbGetCompositeClip(pGC), gx, gy, gWidth, gHeight)) { + fbGetDrawable (pDrawable, dst, dstStride, dstBpp, dstXoff, dstYoff); (*glyph) (dst + (gy + dstYoff) * dstStride, dstStride, dstBpp, @@ -450,6 +453,7 @@ fbImageGlyphBlt (DrawablePtr pDrawable, pPriv->fg, gx + dstXoff, gHeight); + fbFinishAccess (pDrawable); } else #endif |