mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-27 21:22:26 +00:00
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.
This commit is contained in:
parent
073116cc44
commit
4212599c92
4 changed files with 153 additions and 124 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue