From de7a14ca92f99ff03c8ad204aab5be8203c86a72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Tue, 21 Jul 2009 12:55:27 +0200 Subject: [PATCH] EXA: Fix up some issues introduced by 00fe4a297744c81b40f0243fb56ad848a9be6a2b. * Check all pixmaps involved for damage records, fixes visual corruption due to the screen pixmap never having one. * Fix an array size and remove a now superfluous assignment. --- exa/exa_accel.c | 8 ++++---- exa/exa_render.c | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/exa/exa_accel.c b/exa/exa_accel.c index a554fc9c3..3aa55788c 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -455,7 +455,7 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable, } } - if (pDstExaPixmap->pDamage) { + if (pDstExaPixmap->pDamage || pSrcExaPixmap->pDamage) { ExaMigrationRec pixmaps[2]; pixmaps[0].as_dst = TRUE; @@ -810,7 +810,7 @@ exaPolyFillRect(DrawablePtr pDrawable, } if (pExaPixmap->pDamage) { - ExaMigrationRec pixmaps[2]; + ExaMigrationRec pixmaps[1]; pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; @@ -1080,7 +1080,7 @@ exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, if (pExaPixmap->accel_blocked || pTileExaPixmap->accel_blocked) { return FALSE; - } else if (pExaPixmap->pDamage) { + } else if (pExaPixmap->pDamage || pTileExaPixmap->pDamage) { ExaMigrationRec pixmaps[2]; pixmaps[0].as_dst = TRUE; @@ -1255,7 +1255,7 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, pixmaps[0].as_dst = FALSE; pixmaps[0].as_src = TRUE; - pixmaps[0].pPix = pPix = exaGetDrawablePixmap (pDrawable); + pixmaps[0].pPix = pPix; pixmaps[0].pReg = &Reg; exaDoMigration(pixmaps, 1, FALSE); diff --git a/exa/exa_render.c b/exa/exa_render.c index 678b6c202..6566aea3d 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -377,7 +377,8 @@ exaTryDriverCompositeRects(CARD8 op, return -1; } - if (pDstExaPix->pDamage) { + if (pSrcExaPix->pDamage || pDstExaPix->pDamage || + (pMask && pMaskExaPix->pDamage)) { ExaMigrationRec pixmaps[3]; pixmaps[0].as_dst = TRUE; @@ -670,7 +671,8 @@ exaTryDriverComposite(CARD8 op, REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y); - if (pDstExaPix->pDamage) { + if (pSrcExaPix->pDamage || pDstExaPix->pDamage || + (pMask && pMaskExaPix->pDamage)) { ExaMigrationRec pixmaps[3]; pixmaps[0].as_dst = TRUE;