summaryrefslogtreecommitdiff
path: root/exa/exa_unaccel.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2008-08-08 12:17:58 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2008-08-08 12:17:58 +0200
commit4212599c922373a224d2235c74672a3a3aa8e0b1 (patch)
treec143128193b6bb884a963f5473d6419727c316bf /exa/exa_unaccel.c
parent073116cc44859e96374cde46325df8540621d5ee (diff)
EXA: Make sure damage tracking code is inactive if the driver manages pixmaps.
It was always supposed to be like that... It was only recently pointed out (in a rather convoluted way) that it was not in fact the case.
Diffstat (limited to 'exa/exa_unaccel.c')
-rw-r--r--exa/exa_unaccel.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index ee6b98e35..d5d6a306a 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -104,8 +104,8 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
pGC->alu))
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
else
- exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST,
- DamagePendingRegion(pExaPixmap->pDamage));
+ exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pExaPixmap->pDamage ?
+ DamagePendingRegion(pExaPixmap->pDamage) : NULL);
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
}
@@ -362,23 +362,22 @@ ExaCheckComposite (CARD8 op,
CARD32
exaGetPixmapFirstPixel (PixmapPtr pPixmap)
{
- ExaScreenPriv(pPixmap->drawable.pScreen);
CARD32 pixel;
void *fb;
Bool need_finish = FALSE;
BoxRec box;
RegionRec migration;
ExaPixmapPriv (pPixmap);
- Bool sys_valid = !miPointInRegion(&pExaPixmap->validSys, 0, 0, &box);
- Bool damaged = miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0,
- &box);
+ Bool sys_valid = pExaPixmap->pDamage &&
+ !miPointInRegion(&pExaPixmap->validSys, 0, 0, &box);
+ Bool damaged = pExaPixmap->pDamage &&
+ miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0, &box);
Bool offscreen = exaPixmapIsOffscreen(pPixmap);
fb = pExaPixmap->sys_ptr;
/* Try to avoid framebuffer readbacks */
- if (pExaScr->info->CreatePixmap ||
- (!offscreen && !sys_valid && !damaged) ||
+ if ((!offscreen && !sys_valid && !damaged) ||
(offscreen && (!sys_valid || damaged)))
{
box.x1 = 0;