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; ScreenPtr pScreen = pPixmap->drawable.pScreen;
ExaScreenPriv(pScreen); ExaScreenPriv(pScreen);
ExaPixmapPriv(pPixmap); ExaPixmapPriv(pPixmap);
pointer saved_ptr;
Bool ret; Bool ret;
if (!pExaPixmap->driverPriv) if (!pExaPixmap->driverPriv)
return FALSE; return FALSE;
saved_ptr = pPixmap->devPrivate.ptr;
pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap); pPixmap->devPrivate.ptr = ExaGetPixmapAddress(pPixmap);
ret = pExaScr->info->PixmapIsOffscreen(pPixmap); ret = pExaScr->info->PixmapIsOffscreen(pPixmap);
pPixmap->devPrivate.ptr = NULL; pPixmap->devPrivate.ptr = saved_ptr;
return ret; return ret;
} }