summaryrefslogtreecommitdiff
authorMaarten Maathuis <madman2003@gmail.com>2008-12-26 15:38:27 (GMT)
committer Maarten Maathuis <madman2003@gmail.com>2008-12-26 15:38:27 (GMT)
commit3534a5e5d9c5af85149c799f324257f89507fa23 (patch) (side-by-side diff)
tree203b1faa2c6a9e921abd1be3bdf572ce10ea1ecf
parent027b440d4f9f0cdd46addff46fd2d5c44cd5c847 (diff)
downloadxserver-3534a5e5d9c5af85149c799f324257f89507fa23.zip
xserver-3534a5e5d9c5af85149c799f324257f89507fa23.tar.gz
exa: Allow drivers to set non-NULL devPrivate.ptr for !offscreen pixmaps.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--exa/exa.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/exa/exa.c b/exa/exa.c
index d7949fd..ba063bb 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -313,6 +313,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);
@@ -325,7 +330,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;