EXA: Preserve pPixmap->devPrivate.ptr in exaPixmapIsOffscreen_mixed.

Otherwise we may incorrectly clobber it to NULL on repeated PrepareAccess
calls.
This commit is contained in:
Michel Dänzer 2009-09-03 19:11:02 +02:00
parent 120286aef5
commit 8e873185f4

View File

@ -236,14 +236,16 @@ exaPixmapIsOffscreen_mixed(PixmapPtr pPixmap)
ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv(pScreen);
ExaPixmapPriv(pPixmap);
pointer saved_ptr;
Bool ret;
if (!pExaPixmap->driverPriv)
return FALSE;
saved_ptr = pPixmap->devPrivate.ptr;
pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
pPixmap->devPrivate.ptr = NULL;
pPixmap->devPrivate.ptr = saved_ptr;
return ret;
}