EXA: Inline Prepare/FinishAccessWindow into only caller, ChangeWindowAttributes.
Also check the requested mask in addition to the GC state before doing work.
This commit is contained in:
parent
825b3fe11d
commit
f227fbf74f
35
exa/exa.c
35
exa/exa.c
|
@ -671,34 +671,25 @@ exaCreateGC (GCPtr pGC)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
exaPrepareAccessWindow(WindowPtr pWin)
|
||||
{
|
||||
if (pWin->backgroundState == BackgroundPixmap)
|
||||
exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
|
||||
if (pWin->borderIsPixel == FALSE)
|
||||
exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
}
|
||||
|
||||
void
|
||||
exaFinishAccessWindow(WindowPtr pWin)
|
||||
{
|
||||
if (pWin->backgroundState == BackgroundPixmap)
|
||||
exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
|
||||
if (pWin->borderIsPixel == FALSE)
|
||||
exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
}
|
||||
|
||||
static Bool
|
||||
exaChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
|
||||
{
|
||||
Bool ret;
|
||||
|
||||
exaPrepareAccessWindow(pWin);
|
||||
if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap)
|
||||
exaPrepareAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
|
||||
if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE)
|
||||
exaPrepareAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK);
|
||||
|
||||
ret = fbChangeWindowAttributes(pWin, mask);
|
||||
exaFinishAccessWindow(pWin);
|
||||
|
||||
if ((mask & CWBorderPixmap) && pWin->borderIsPixel == FALSE)
|
||||
exaFinishAccess(&pWin->border.pixmap->drawable, EXA_PREPARE_MASK);
|
||||
|
||||
if ((mask & CWBackPixmap) && pWin->backgroundState == BackgroundPixmap)
|
||||
exaFinishAccess(&pWin->background.pixmap->drawable, EXA_PREPARE_SRC);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user