Move drawable lock acquisition into DRIClipNotify from DRIValidateTree, so
we only take it when clipping a DRI drawable instead of on every tree update. Note drawable lock acquisition per- screen instead of globally, and drop it in BlockHandler if necessary.
This commit is contained in:
parent
39ce5f1544
commit
fe0c838b5d
|
@ -1,3 +1,11 @@
|
|||
2006-01-06 Adam Jackson <ajax@freedesktop.org>
|
||||
|
||||
* hw/xfree86/dri/dri.c:
|
||||
* hw/xfree86/dri/dristruct.h:
|
||||
Move drawable lock acquisition into DRIClipNotify from DRIValidateTree, so we only take it when
|
||||
clipping a DRI drawable instead of on every tree update. Note drawable lock acquisition per-
|
||||
screen instead of globally, and drop it in BlockHandler if necessary.
|
||||
|
||||
2006-01-06 Adam Jackson <ajax@freedesktop.org>
|
||||
|
||||
* hw/xfree86/loader/misym.c:
|
||||
|
|
|
@ -1405,6 +1405,11 @@ DRIDoBlockHandler(int screenNum, pointer blockData,
|
|||
DRI_2D_CONTEXT,
|
||||
pDRIPriv->partial3DContextStore);
|
||||
}
|
||||
|
||||
if (pDRIPriv->windowsTouched)
|
||||
DRM_SPINUNLOCK(&pDRIPriv->pSAREA->drawable_lock, 1);
|
||||
pDRIPriv->windowsTouched = FALSE;
|
||||
|
||||
DRIUnlock(pScreen);
|
||||
}
|
||||
|
||||
|
@ -1751,13 +1756,6 @@ DRILockTree(ScreenPtr pScreen)
|
|||
}
|
||||
}
|
||||
|
||||
/* It appears that somebody is relying on the lock being set even
|
||||
if we aren't touching 3D windows */
|
||||
|
||||
#define DRI_BROKEN
|
||||
|
||||
static Bool DRIWindowsTouched = FALSE;
|
||||
|
||||
int
|
||||
DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind)
|
||||
{
|
||||
|
@ -1768,15 +1766,6 @@ DRIValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind)
|
|||
|
||||
if(!pDRIPriv) return returnValue;
|
||||
|
||||
DRIWindowsTouched = FALSE;
|
||||
|
||||
#ifdef DRI_BROKEN
|
||||
if(!DRIWindowsTouched) {
|
||||
DRILockTree(pScreen);
|
||||
DRIWindowsTouched = TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* call lower wrapped functions */
|
||||
if(pDRIPriv->wrap.ValidateTree) {
|
||||
/* unwrap */
|
||||
|
@ -1817,12 +1806,6 @@ DRIPostValidateTree(WindowPtr pParent, WindowPtr pChild, VTKind kind)
|
|||
pDRIPriv->wrap.PostValidateTree = pScreen->PostValidateTree;
|
||||
pScreen->PostValidateTree = DRIPostValidateTree;
|
||||
}
|
||||
|
||||
if (DRIWindowsTouched) {
|
||||
/* Release spin lock */
|
||||
DRM_SPINUNLOCK(&pDRIPriv->pSAREA->drawable_lock, 1);
|
||||
DRIWindowsTouched = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -1836,12 +1819,10 @@ DRIClipNotify(WindowPtr pWin, int dx, int dy)
|
|||
|
||||
if ((pDRIDrawablePriv = DRI_DRAWABLE_PRIV_FROM_WINDOW(pWin))) {
|
||||
|
||||
#ifndef DRI_BROKEN
|
||||
if(!DRIWindowsTouched) {
|
||||
if(!pDRIPriv->windowsTouched) {
|
||||
DRILockTree(pScreen);
|
||||
DRIWindowsTouched = TRUE;
|
||||
pDRIPriv->windowsTouched = TRUE;
|
||||
}
|
||||
#endif
|
||||
|
||||
pDRIPriv->pSAREA->drawableTable[pDRIDrawablePriv->drawableIndex].stamp
|
||||
= DRIDrawableValidationStamp++;
|
||||
|
|
|
@ -99,6 +99,7 @@ typedef struct _DRIScreenPrivRec
|
|||
Bool grabbedDRILock;
|
||||
Bool drmSIGIOHandlerInstalled;
|
||||
Bool wrapped;
|
||||
Bool windowsTouched;
|
||||
int lockRefCount;
|
||||
} DRIScreenPrivRec, *DRIScreenPrivPtr;
|
||||
|
||||
|
|
Loading…
Reference in New Issue