EXA: Hide pixmap pointer outside of exaPrepare/FinishAccess whenever possible.

We finally want to catch all cases where the pixmap pointer is dereferenced
outside of exaPrepare/FinishAccess.

Also fix a couple of such cases exposed by this change.
This commit is contained in:
Michel Dänzer
2007-09-06 13:10:16 +02:00
parent 962eddd7a2
commit 6c9d7ed61b
4 changed files with 76 additions and 50 deletions

View File

@@ -323,10 +323,8 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
pPixmap->drawable.height,
exaPixmapIsDirty(pPixmap) ? 'd' : 'c'));
if (pExaScr->hideOffscreenPixmapData)
pPixmap->devPrivate.ptr = NULL;
else
pPixmap->devPrivate.ptr = pExaPixmap->fb_ptr;
pExaPixmap->offscreen = TRUE;
pPixmap->devKind = pExaPixmap->fb_pitch;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
}
@@ -365,7 +363,8 @@ exaDoMoveOutPixmap (ExaMigrationPtr migrate)
pPixmap->drawable.height,
exaPixmapIsDirty(pPixmap) ? 'd' : 'c'));
pPixmap->devPrivate.ptr = pExaPixmap->sys_ptr;
pExaPixmap->offscreen = FALSE;
pPixmap->devKind = pExaPixmap->sys_pitch;
pPixmap->drawable.serialNumber = NEXT_SERIAL_NUMBER;
}