From 8b652435cd42929e2d187b353b3b20e798569356 Mon Sep 17 00:00:00 2001 From: Maarten Maathuis Date: Sat, 8 Aug 2009 10:35:01 +0200 Subject: exa: minor cleanup --- exa/exa_mixed.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'exa') diff --git a/exa/exa_mixed.c b/exa/exa_mixed.c index 0d2552d8b..abfa95790 100644 --- a/exa/exa_mixed.c +++ b/exa/exa_mixed.c @@ -87,7 +87,6 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, pExaPixmap->area = NULL; pExaPixmap->offscreen = FALSE; - pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; pExaPixmap->fb_ptr = NULL; pExaPixmap->pDamage = NULL; @@ -95,19 +94,19 @@ exaCreatePixmap_mixed(ScreenPtr pScreen, int w, int h, int depth, exaSetAccelBlock(pExaScr, pExaPixmap, w, h, bpp); + /* Avoid freeing sys_ptr. */ + pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; + + (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0, + paddedWidth, NULL); + + /* We want to be able to transfer the pixmap to driver memory later on. */ + pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; + /* A scratch pixmap will become a driver pixmap right away. */ if (!w || !h) { exaCreateDriverPixmap_mixed(pPixmap); } else { - /* Avoid freeing sys_ptr. */ - pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED; - - (*pScreen->ModifyPixmapHeader)(pPixmap, w, h, 0, 0, - paddedWidth, NULL); - - /* We want to be able to copy the pixmap to driver memory later on. */ - pExaPixmap->score = EXA_PIXMAP_SCORE_INIT; - /* Set up damage tracking */ pExaPixmap->pDamage = DamageCreate (NULL, NULL, DamageReportNone, TRUE, -- cgit v1.2.3