summaryrefslogtreecommitdiff
path: root/exa/exa.c
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-06-18 22:34:02 +0100
committerAlan Hourihane <alanh@tungstengraphics.com>2008-06-18 22:34:02 +0100
commit528b4e36ade482df99747081688ae52cfaeb28eb (patch)
tree61c62eac77c95a036080d541dfbed2f6e7879992 /exa/exa.c
parent068fa63496c7c363706f0d356b5132bc591c04c6 (diff)
Set driverPriv immediately on CreatePixmap.
If it's NULL anyway, we bail, if not, it lets ModifyPixmapHeader know about the private.
Diffstat (limited to 'exa/exa.c')
-rw-r--r--exa/exa.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/exa/exa.c b/exa/exa.c
index fc047483d..48352bd5b 100644
--- a/exa/exa.c
+++ b/exa/exa.c
@@ -314,7 +314,6 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
if (driver_alloc) {
size_t paddedWidth, datasize;
- void *driver_priv;
paddedWidth = ((w * bpp + FB_MASK) >> FB_SHIFT) * sizeof(FbBits);
if (paddedWidth / 4 > 32767 || h > 32767)
@@ -327,22 +326,21 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
datasize = h * paddedWidth;
- driver_priv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
- if (!driver_priv) {
+ pExaPixmap->driverPriv = pExaScr->info->CreatePixmap(pScreen, datasize, 0);
+ if (!pExaPixmap->driverPriv) {
fbDestroyPixmap(pPixmap);
return NULL;
}
(*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0,
paddedWidth, NULL);
- pExaPixmap->driverPriv = driver_priv;
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
pExaPixmap->fb_ptr = NULL;
} else {
- pExaPixmap->driverPriv = NULL;
- /* Scratch pixmaps may have w/h equal to zero, and may not be
- * migrated.
- */
+ pExaPixmap->driverPriv = NULL;
+ /* Scratch pixmaps may have w/h equal to zero, and may not be
+ * migrated.
+ */
if (!w || !h)
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
else