summaryrefslogtreecommitdiff
path: root/uxa/uxa-unaccel.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-08-04 18:17:20 -0700
committerKeith Packard <keithp@keithp.com>2008-08-05 15:41:51 -0700
commitfc4d9c55a7fa8001786c1e4da10f005406c57ece (patch)
tree84f6f63b65c4430c3ad1a9697de7d9ac0ba9898a /uxa/uxa-unaccel.c
parentc155bb3cb17a3bd3b2e90be52cd1fc90147c4e17 (diff)
Change PrepareAccess to take access mode rather than index
Diffstat (limited to 'uxa/uxa-unaccel.c')
-rw-r--r--uxa/uxa-unaccel.c96
1 files changed, 48 insertions, 48 deletions
diff --git a/uxa/uxa-unaccel.c b/uxa/uxa-unaccel.c
index 27194208..01c13224 100644
--- a/uxa/uxa-unaccel.c
+++ b/uxa/uxa-unaccel.c
@@ -45,9 +45,9 @@ void
uxa_prepare_access_gc(GCPtr pGC)
{
if (pGC->stipple)
- uxa_prepare_access(&pGC->stipple->drawable, UXA_PREPARE_MASK);
+ uxa_prepare_access(&pGC->stipple->drawable, UXA_ACCESS_RO);
if (pGC->fillStyle == FillTiled)
- uxa_prepare_access(&pGC->tile.pixmap->drawable, UXA_PREPARE_SRC);
+ uxa_prepare_access(&pGC->tile.pixmap->drawable, UXA_ACCESS_RO);
}
/**
@@ -57,9 +57,9 @@ void
uxa_finish_access_gc(GCPtr pGC)
{
if (pGC->fillStyle == FillTiled)
- uxa_finish_access(&pGC->tile.pixmap->drawable, UXA_PREPARE_MASK);
+ uxa_finish_access(&pGC->tile.pixmap->drawable);
if (pGC->stipple)
- uxa_finish_access(&pGC->stipple->drawable, UXA_PREPARE_SRC);
+ uxa_finish_access(&pGC->stipple->drawable);
}
#if DEBUG_TRACE_FALL
@@ -75,11 +75,11 @@ uxa_check_fill_spans (DrawablePtr pDrawable, GCPtr pGC, int nspans,
DDXPointPtr ppt, int *pwidth, int fSorted)
{
UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
uxa_prepare_access_gc (pGC);
fbFillSpans (pDrawable, pGC, nspans, ppt, pwidth, fSorted);
uxa_finish_access_gc (pGC);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
}
void
@@ -87,9 +87,9 @@ uxa_check_set_spans (DrawablePtr pDrawable, GCPtr pGC, char *psrc,
DDXPointPtr ppt, int *pwidth, int nspans, int fSorted)
{
UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
fbSetSpans (pDrawable, pGC, psrc, ppt, pwidth, nspans, fSorted);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
}
void
@@ -98,9 +98,9 @@ uxa_check_put_image (DrawablePtr pDrawable, GCPtr pGC, int depth,
char *bits)
{
UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
}
RegionPtr
@@ -111,11 +111,11 @@ uxa_check_copy_area (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst,
uxa_drawable_location(pSrc), uxa_drawable_location(pDst)));
- uxa_prepare_access (pDst, UXA_PREPARE_DEST);
- uxa_prepare_access (pSrc, UXA_PREPARE_SRC);
+ uxa_prepare_access (pDst, UXA_ACCESS_RW);
+ uxa_prepare_access (pSrc, UXA_ACCESS_RO);
ret = fbCopyArea (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty);
- uxa_finish_access (pSrc, UXA_PREPARE_SRC);
- uxa_finish_access (pDst, UXA_PREPARE_DEST);
+ uxa_finish_access (pSrc);
+ uxa_finish_access (pDst);
return ret;
}
@@ -129,12 +129,12 @@ uxa_check_copy_plane (DrawablePtr pSrc, DrawablePtr pDst, GCPtr pGC,
UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrc, pDst,
uxa_drawable_location(pSrc), uxa_drawable_location(pDst)));
- uxa_prepare_access (pDst, UXA_PREPARE_DEST);
- uxa_prepare_access (pSrc, UXA_PREPARE_SRC);
+ uxa_prepare_access (pDst, UXA_ACCESS_RW);
+ uxa_prepare_access (pSrc, UXA_ACCESS_RO);
ret = fbCopyPlane (pSrc, pDst, pGC, srcx, srcy, w, h, dstx, dsty,
bitPlane);
- uxa_finish_access (pSrc, UXA_PREPARE_SRC);
- uxa_finish_access (pDst, UXA_PREPARE_DEST);
+ uxa_finish_access (pSrc);
+ uxa_finish_access (pDst);
return ret;
}
@@ -144,9 +144,9 @@ uxa_check_poly_point (DrawablePtr pDrawable, GCPtr pGC, int mode, int npt,
DDXPointPtr pptInit)
{
UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
fbPolyPoint (pDrawable, pGC, mode, npt, pptInit);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
}
void
@@ -158,11 +158,11 @@ uxa_check_poly_lines (DrawablePtr pDrawable, GCPtr pGC,
pGC->lineWidth, mode, npt));
if (pGC->lineWidth == 0) {
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
uxa_prepare_access_gc (pGC);
fbPolyLine (pDrawable, pGC, mode, npt, ppt);
uxa_finish_access_gc (pGC);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
return;
}
/* fb calls mi functions in the lineWidth != 0 case. */
@@ -176,11 +176,11 @@ uxa_check_poly_segment (DrawablePtr pDrawable, GCPtr pGC,
UXA_FALLBACK(("to %p (%c) width %d, count %d\n", pDrawable,
uxa_drawable_location(pDrawable), pGC->lineWidth, nsegInit));
if (pGC->lineWidth == 0) {
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
uxa_prepare_access_gc (pGC);
fbPolySegment (pDrawable, pGC, nsegInit, pSegInit);
uxa_finish_access_gc (pGC);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
return;
}
/* fb calls mi functions in the lineWidth != 0 case. */
@@ -200,11 +200,11 @@ uxa_check_poly_arc (DrawablePtr pDrawable, GCPtr pGC,
#if 0
if (pGC->lineWidth == 0)
{
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
uxa_prepare_access_gc (pGC);
fbPolyArc (pDrawable, pGC, narcs, pArcs);
uxa_finish_access_gc (pGC);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
return;
}
#endif
@@ -217,11 +217,11 @@ uxa_check_poly_fill_rect (DrawablePtr pDrawable, GCPtr pGC,
{
UXA_FALLBACK(("to %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
uxa_prepare_access_gc (pGC);
fbPolyFillRect (pDrawable, pGC, nrect, prect);
uxa_finish_access_gc (pGC);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
}
void
@@ -231,11 +231,11 @@ uxa_check_image_glyph_blt (DrawablePtr pDrawable, GCPtr pGC,
{
UXA_FALLBACK(("to %p (%c)\n", pDrawable,
uxa_drawable_location(pDrawable)));
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
uxa_prepare_access_gc (pGC);
fbImageGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
uxa_finish_access_gc (pGC);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
}
void
@@ -245,11 +245,11 @@ uxa_check_poly_glyph_blt (DrawablePtr pDrawable, GCPtr pGC,
{
UXA_FALLBACK(("to %p (%c), style %d alu %d\n", pDrawable,
uxa_drawable_location(pDrawable), pGC->fillStyle, pGC->alu));
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
uxa_prepare_access_gc (pGC);
fbPolyGlyphBlt (pDrawable, pGC, x, y, nglyph, ppci, pglyphBase);
uxa_finish_access_gc (pGC);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pDrawable);
}
void
@@ -260,13 +260,13 @@ uxa_check_push_pixels (GCPtr pGC, PixmapPtr pBitmap,
UXA_FALLBACK(("from %p to %p (%c,%c)\n", pBitmap, pDrawable,
uxa_drawable_location(&pBitmap->drawable),
uxa_drawable_location(pDrawable)));
- uxa_prepare_access (pDrawable, UXA_PREPARE_DEST);
- uxa_prepare_access (&pBitmap->drawable, UXA_PREPARE_SRC);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RW);
+ uxa_prepare_access (&pBitmap->drawable, UXA_ACCESS_RO);
uxa_prepare_access_gc (pGC);
fbPushPixels (pGC, pBitmap, pDrawable, w, h, x, y);
uxa_finish_access_gc (pGC);
- uxa_finish_access (&pBitmap->drawable, UXA_PREPARE_SRC);
- uxa_finish_access (pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (&pBitmap->drawable);
+ uxa_finish_access (pDrawable);
}
void
@@ -278,9 +278,9 @@ uxa_check_get_spans (DrawablePtr pDrawable,
char *pdstStart)
{
UXA_FALLBACK(("from %p (%c)\n", pDrawable, uxa_drawable_location(pDrawable)));
- uxa_prepare_access (pDrawable, UXA_PREPARE_SRC);
+ uxa_prepare_access (pDrawable, UXA_ACCESS_RO);
fbGetSpans (pDrawable, wMax, ppt, pwidth, nspans, pdstStart);
- uxa_finish_access (pDrawable, UXA_PREPARE_SRC);
+ uxa_finish_access (pDrawable);
}
void
@@ -300,11 +300,11 @@ uxa_check_composite (CARD8 op,
UXA_FALLBACK(("from picts %p/%p to pict %p\n",
pSrc, pMask, pDst));
- uxa_prepare_access (pDst->pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access (pDst->pDrawable, UXA_ACCESS_RW);
if (pSrc->pDrawable != NULL)
- uxa_prepare_access (pSrc->pDrawable, UXA_PREPARE_SRC);
+ uxa_prepare_access (pSrc->pDrawable, UXA_ACCESS_RO);
if (pMask && pMask->pDrawable != NULL)
- uxa_prepare_access (pMask->pDrawable, UXA_PREPARE_MASK);
+ uxa_prepare_access (pMask->pDrawable, UXA_ACCESS_RO);
fbComposite (op,
pSrc,
pMask,
@@ -318,10 +318,10 @@ uxa_check_composite (CARD8 op,
width,
height);
if (pMask && pMask->pDrawable != NULL)
- uxa_finish_access (pMask->pDrawable, UXA_PREPARE_MASK);
+ uxa_finish_access (pMask->pDrawable);
if (pSrc->pDrawable != NULL)
- uxa_finish_access (pSrc->pDrawable, UXA_PREPARE_SRC);
- uxa_finish_access (pDst->pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access (pSrc->pDrawable);
+ uxa_finish_access (pDst->pDrawable);
}
void
@@ -333,9 +333,9 @@ uxa_check_add_traps (PicturePtr pPicture,
{
UXA_FALLBACK(("to pict %p (%c)\n",
uxa_drawable_location(pPicture->pDrawable)));
- uxa_prepare_access(pPicture->pDrawable, UXA_PREPARE_DEST);
+ uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW);
fbAddTraps (pPicture, x_off, y_off, ntrap, traps);
- uxa_finish_access(pPicture->pDrawable, UXA_PREPARE_DEST);
+ uxa_finish_access(pPicture->pDrawable);
}
/**
@@ -350,7 +350,7 @@ uxa_get_pixmap_first_pixel (PixmapPtr pPixmap)
CARD32 pixel;
void *fb;
- uxa_prepare_access (&pPixmap->drawable, UXA_PREPARE_SRC);
+ uxa_prepare_access (&pPixmap->drawable, UXA_ACCESS_RO);
fb = pPixmap->devPrivate.ptr;
switch (pPixmap->drawable.bitsPerPixel) {
@@ -364,7 +364,7 @@ uxa_get_pixmap_first_pixel (PixmapPtr pPixmap)
pixel = *(CARD8 *)fb;
break;
}
- uxa_finish_access(&pPixmap->drawable, UXA_PREPARE_SRC);
+ uxa_finish_access(&pPixmap->drawable);
return pixel;
}