From 89d7b88f32f9227fa72a043675367b94c4c9283c Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Fri, 13 Mar 2009 00:40:43 +0100 Subject: exa: allow exaModifyPixmapHeader to set sys_ptr for EXA_HANDLES_PIXMAPS - exaModifyPixmapHeader would save sys_ptr if needed, but it would be NULL'ed afterwards. - This is needed to support pixmaps that are not offscreen. --- exa/exa.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/exa/exa.c b/exa/exa.c index b5f3542d3..7145e1253 100644 --- a/exa/exa.c +++ b/exa/exa.c @@ -332,12 +332,14 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth, return NULL; } - (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0, - paddedWidth, NULL); - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - pExaPixmap->fb_ptr = NULL; - pExaPixmap->pDamage = NULL; - pExaPixmap->sys_ptr = pPixmap->devPrivate.ptr; + /* Allow ModifyPixmapHeader to set sys_ptr appropriately. */ + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + pExaPixmap->fb_ptr = NULL; + pExaPixmap->pDamage = NULL; + pExaPixmap->sys_ptr = NULL; + + (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0, + paddedWidth, NULL); } else { pExaPixmap->driverPriv = NULL; -- cgit v1.2.3