diff options
author | Keith Packard <keithp@keithp.com> | 2008-08-04 18:17:20 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2008-08-05 15:41:51 -0700 |
commit | fc4d9c55a7fa8001786c1e4da10f005406c57ece (patch) | |
tree | 84f6f63b65c4430c3ad1a9697de7d9ac0ba9898a /uxa/uxa-accel.c | |
parent | c155bb3cb17a3bd3b2e90be52cd1fc90147c4e17 (diff) |
Change PrepareAccess to take access mode rather than index
Diffstat (limited to 'uxa/uxa-accel.c')
-rw-r--r-- | uxa/uxa-accel.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/uxa/uxa-accel.c b/uxa/uxa-accel.c index 7c7b3e9b..20a56574 100644 --- a/uxa/uxa-accel.c +++ b/uxa/uxa-accel.c @@ -189,8 +189,7 @@ uxa_do_put_image (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, int dstXoff, dstYoff; if (!access_prepared) { - uxa_prepare_access(pDrawable, UXA_PREPARE_DEST); - + uxa_prepare_access(pDrawable, UXA_ACCESS_RW); access_prepared = TRUE; } @@ -210,7 +209,7 @@ uxa_do_put_image (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y, } if (access_prepared) - uxa_finish_access(pDrawable, UXA_PREPARE_DEST); + uxa_finish_access(pDrawable); else uxa_mark_sync(pDrawable->pScreen); @@ -240,10 +239,10 @@ uxa_do_shm_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, if (!pPixmap) return FALSE; - uxa_prepare_access (pDrawable, UXA_PREPARE_DEST); + uxa_prepare_access (pDrawable, UXA_ACCESS_RW); fbCopyArea((DrawablePtr)pPixmap, pDrawable, pGC, sx, sy, sw, sh, dx, dy); - uxa_finish_access(pDrawable, UXA_PREPARE_DEST); + uxa_finish_access(pDrawable); FreeScratchPixmapHeader(pPixmap); @@ -266,10 +265,10 @@ uxa_shm_put_image(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int form { if (!uxa_do_shm_put_image(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data)) { - uxa_prepare_access (pDrawable, UXA_PREPARE_DEST); + uxa_prepare_access (pDrawable, UXA_ACCESS_RW); fbShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh, dx, dy, data); - uxa_finish_access(pDrawable, UXA_PREPARE_DEST); + uxa_finish_access(pDrawable); } } @@ -474,12 +473,12 @@ fallback: UXA_FALLBACK(("from %p to %p (%c,%c)\n", pSrcDrawable, pDstDrawable, uxa_drawable_location(pSrcDrawable), uxa_drawable_location(pDstDrawable))); - uxa_prepare_access (pDstDrawable, UXA_PREPARE_DEST); - uxa_prepare_access (pSrcDrawable, UXA_PREPARE_SRC); + uxa_prepare_access (pDstDrawable, UXA_ACCESS_RW); + uxa_prepare_access (pSrcDrawable, UXA_ACCESS_RO); fbCopyNtoN (pSrcDrawable, pDstDrawable, pGC, pbox, nbox, dx, dy, reverse, upsidedown, bitplane, closure); - uxa_finish_access (pSrcDrawable, UXA_PREPARE_SRC); - uxa_finish_access (pDstDrawable, UXA_PREPARE_DEST); + uxa_finish_access (pSrcDrawable); + uxa_finish_access (pDstDrawable); } RegionPtr @@ -1029,9 +1028,9 @@ fallback: 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); fbGetImage (pDrawable, x, y, w, h, format, planeMask, d); - uxa_finish_access (pDrawable, UXA_PREPARE_SRC); + uxa_finish_access (pDrawable); out: return; |