exa: delay malloc for "mixed"

This commit is contained in:
Maarten Maathuis 2009-08-05 18:39:47 +02:00
commit 3047bd0674
3 changed files with 17 additions and 10 deletions

View file

@ -81,17 +81,10 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth,
datasize = h * paddedWidth;
/* Allocate temporary pixmap. */
pExaPixmap->sys_ptr = malloc(datasize);
/* We will allocate the system pixmap later if needed. */
pExaPixmap->sys_ptr = NULL;
pExaPixmap->sys_pitch = paddedWidth;
if (!pExaPixmap->sys_ptr) {
swap(pExaScr, pScreen, DestroyPixmap);
pScreen->DestroyPixmap (pPixmap);
swap(pExaScr, pScreen, DestroyPixmap);
return NULL;
}
pExaPixmap->area = NULL;
pExaPixmap->offscreen = FALSE;
pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;