EXA: Replace open coded CopyArea logic with GC op call.

This commit is contained in:
Michel Dänzer 2008-07-30 18:27:33 +02:00
parent bb2cacd33e
commit 37087bc106

View File

@ -261,22 +261,16 @@ exaDoShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth,
if (format == ZPixmap) if (format == ZPixmap)
{ {
PixmapPtr pPixmap; PixmapPtr pPixmap =
ExaPixmapPriv(exaGetDrawablePixmap(pDrawable)); 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) if (!pPixmap)
return FALSE; return FALSE;
if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle, pGC->ops->CopyArea(&pPixmap->drawable, pDrawable, pGC, sx, sy, sw, sh,
pGC->alu)) dx, dy);
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);
FreeScratchPixmapHeader(pPixmap); FreeScratchPixmapHeader(pPixmap);