exa: Allow drivers to set non-NULL devPrivate.ptr for !offscreen pixmaps.
This commit is contained in:
parent
027b440d4f
commit
3534a5e5d9
|
@ -313,6 +313,11 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
|
||||||
|
|
||||||
datasize = h * paddedWidth;
|
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);
|
pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
|
||||||
if (!pExaPixmap->driverPriv) {
|
if (!pExaPixmap->driverPriv) {
|
||||||
fbDestroyPixmap(pPixmap);
|
fbDestroyPixmap(pPixmap);
|
||||||
|
@ -325,7 +330,6 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
|
||||||
pExaPixmap->fb_ptr = NULL;
|
pExaPixmap->fb_ptr = NULL;
|
||||||
pExaPixmap->pDamage = NULL;
|
pExaPixmap->pDamage = NULL;
|
||||||
pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
|
pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr;
|
||||||
pPixmap->devPrivate.ptr = NULL;
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
pExaPixmap->driverPriv = NULL;
|
pExaPixmap->driverPriv = NULL;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user