summaryrefslogtreecommitdiff
path: root/exa/exa_accel.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2008-07-30 18:27:33 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2008-07-30 18:27:33 +0200
commit37087bc10630ee7740df1369b3e56a44fd2ad2b0 (patch)
tree343887a0d0370c1d91f29609d0a0886ce5cf1d7f /exa/exa_accel.c
parentbb2cacd33eb85f39b9e7fa554545611957df677d (diff)
EXA: Replace open coded CopyArea logic with GC op call.
Diffstat (limited to 'exa/exa_accel.c')
-rw-r--r--exa/exa_accel.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 1dbb269f6..8bcc2ce34 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -261,22 +261,16 @@ exaDoShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
if (format == ZPixmap)
{
- PixmapPtr pPixmap;
- ExaPixmapPriv(exaGetDrawablePixmap(pDrawable));
+ PixmapPtr pPixmap =
+ GetScratchPixmapHeader(pDrawable->pScreen, w, h, depth,
+ BitsPerPixel(depth), PixmapBytePad(w, depth),
+ (pointer)data);
- pPixmap = GetScratchPixmapHeader(pDrawable->pScreen, w, h, depth,
- BitsPerPixel(depth), PixmapBytePad(w, depth), (pointer)data);
if (!pPixmap)
return FALSE;
- if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
- pGC->alu))
- exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
- else
- exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST,
- DamagePendingRegion(pExaPixmap->pDamage));
- fbCopyArea((DrawablePtr)pPixmap, pDrawable, pGC, sx, sy, sw, sh, dx, dy);
- exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
+ pGC->ops->CopyArea(&pPixmap->drawable, pDrawable, pGC, sx, sy, sw, sh,
+ dx, dy);
FreeScratchPixmapHeader(pPixmap);