summaryrefslogtreecommitdiff
path: root/fb/fb24_32.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/fb24_32.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/fb24_32.c')
-rw-r--r--fb/fb24_32.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/fb/fb24_32.c b/fb/fb24_32.c
index 572da4865..0fdd9b821 100644
--- a/fb/fb24_32.c
+++ b/fb/fb24_32.c
@@ -305,6 +305,8 @@ fb24_32GetSpans(DrawablePtr pDrawable,
ppt++;
pwidth++;
}
+
+ fbFinishAccess (pDrawable);
}
void
@@ -366,6 +368,8 @@ fb24_32SetSpans (DrawablePtr pDrawable,
ppt++;
pwidth++;
}
+
+ fbFinishAccess (pDrawable);
}
/*
@@ -429,6 +433,8 @@ fb24_32PutZImage (DrawablePtr pDrawable,
alu,
pm);
}
+
+ fbFinishAccess (pDrawable);
}
void
@@ -463,6 +469,8 @@ fb24_32GetImage (DrawablePtr pDrawable,
fb24_32BltUp (src + (y + srcYoff) * srcStride, srcStride, x + srcXoff,
(CARD8 *) d, dstStride, 0,
w, h, GXcopy, pm);
+
+ fbFinishAccess (pDrawable);
}
void
@@ -519,6 +527,9 @@ fb24_32CopyMtoN (DrawablePtr pSrcDrawable,
pPriv->pm);
pbox++;
}
+
+ fbFinishAccess (pSrcDrawable);
+ fbFinishAccess (pDstDrawable);
}
PixmapPtr
@@ -563,6 +574,9 @@ fb24_32ReformatTile(PixmapPtr pOldTile, int bitsPerPixel)
GXcopy,
FB_ALLONES);
+ fbFinishAccess (&pOldTile->drawable);
+ fbFinishAccess (&pNewTile->drawable);
+
return pNewTile;
}