exa/mixed: be more thorough about setting fb_pitch when needed

Signed-off-by: Maarten Maathuis <madman2003@gmail.com>
Acked-by: Michel Dänzer <michel@daenzer.net>
This commit is contained in:
Maarten Maathuis 2009-11-18 21:23:09 +01:00 committed by Keith Packard
parent 647b79f87a
commit d4fc245115

View File

@ -98,14 +98,17 @@ exaDoMigration_mixed(ExaMigrationPtr pixmaps, int npixmaps, Bool can_accel)
if (!pExaPixmap->driverPriv)
exaCreateDriverPixmap_mixed(pPixmap);
if (pExaPixmap->pDamage && exaPixmapIsOffscreen(pPixmap)) {
ExaScreenPriv(pPixmap->drawable.pScreen);
if (exaPixmapIsOffscreen(pPixmap)) {
pPixmap->devKind = pExaPixmap->fb_pitch;
exaCopyDirtyToFb(pixmaps + i);
if (pExaScr->deferred_mixed_pixmap == pPixmap)
pExaScr->deferred_mixed_pixmap = NULL;
if (pExaPixmap->pDamage) {
ExaScreenPriv(pPixmap->drawable.pScreen);
exaCopyDirtyToFb(pixmaps + i);
if (pExaScr->deferred_mixed_pixmap == pPixmap)
pExaScr->deferred_mixed_pixmap = NULL;
}
}
pExaPixmap->offscreen = exaPixmapIsOffscreen(pPixmap);
@ -133,8 +136,9 @@ exaMoveInPixmap_mixed(PixmapPtr pPixmap)
void
exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
{
ExaPixmapPriv(pPixmap);
if (!ExaDoPrepareAccess(pPixmap, index)) {
ExaPixmapPriv(pPixmap);
Bool is_offscreen = exaPixmapIsOffscreen(pPixmap);
ExaMigrationRec pixmaps[1];
@ -197,7 +201,8 @@ exaPrepareAccessReg_mixed(PixmapPtr pPixmap, int index, RegionPtr pReg)
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
pPixmap->devKind = pExaPixmap->sys_pitch;
pExaPixmap->offscreen = FALSE;
}
} else
pPixmap->devKind = pExaPixmap->fb_pitch;
}
/* Move back results of software rendering on system memory copy of mixed driver