exa: Allow drivers to set non-NULL devPrivate.ptr for !offscreen pixmaps.

(cherry picked from commit 3534a5e5d9)
This commit is contained in:
Maarten Maathuis 2008-12-26 16:38:27 +01:00 committed by Keith Packard
parent 4130761f15
commit 2056c10d12

View File

@ -314,6 +314,11 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
datasize = h * paddedWidth;
/* Set this before driver hooks, to allow for !offscreen pixmaps.
* !offscreen pixmaps have a valid pointer at all times.
*/
pPixmap->devPrivate.ptr = NULL;
pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
if (!pExaPixmap->driverPriv) {
fbDestroyPixmap(pPixmap);
@ -326,7 +331,6 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
pExaPixmap->fb_ptr = NULL;
pExaPixmap->pDamage = NULL;
pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
pPixmap->devPrivate.ptr = NULL;
} else {
pExaPixmap->driverPriv = NULL;