diff options
Diffstat (limited to 'exa')
-rw-r--r-- | exa/exa.c | 33 | ||||
-rw-r--r-- | exa/exa_priv.h | 6 |
2 files changed, 12 insertions, 27 deletions
@@ -671,34 +671,25 @@ exaCreateGC (GCPtr pGC) return TRUE; } -void -exaPrepareAccessWindow(WindowPtr pWin) +static Bool +exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask) { - if (pWin->backgroundState == BackgroundPixmap) + Bool ret; + + if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); - if (pWin->borderIsPixel == FALSE) - exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC); -} + if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE) + exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); -void -exaFinishAccessWindow(WindowPtr pWin) -{ - if (pWin->backgroundState == BackgroundPixmap) - exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); + ret = fbChangeWindowAttributes(pWin, mask); - if (pWin->borderIsPixel == FALSE) - exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC); -} + if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE) + exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK); -static Bool -exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask) -{ - Bool ret; + if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap) + exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC); - exaPrepareAccessWindow(pWin); - ret = fbChangeWindowAttributes(pWin, mask); - exaFinishAccessWindow(pWin); return ret; } diff --git a/exa/exa_priv.h b/exa/exa_priv.h index 9ec2a560c..dc6a6e07c 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -260,12 +260,6 @@ typedef struct { */ void exaDDXDriverInit (ScreenPtr pScreen); -void -exaPrepareAccessWindow(WindowPtr pWin); - -void -exaFinishAccessWindow(WindowPtr pWin); - /* exa_unaccel.c */ void exaPrepareAccessGC(GCPtr pGC); |