xfree86/xv: Change the behaviour of AdjustFrame to reput everything

Also reput PutVideo/GetVideo ports in AdjustFrame. This makes the
overlay track the screen panning instead of staying stationary in the
wrong place.

Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com>
Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
This commit is contained in:
Ville Syrjälä 2010-10-29 17:14:34 +03:00
parent d794be8121
commit 3d4d0237a3

View File

@ -1286,24 +1286,26 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
XvPortRecPrivatePtr pPriv; XvPortRecPrivatePtr pPriv;
for(i = pa->nPorts; i > 0; i--, pPort++) { for(i = pa->nPorts; i > 0; i--, pPort++) {
Bool visible;
pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr; pPriv = (XvPortRecPrivatePtr)pPort->devPriv.ptr;
if(!pPriv->type && (pPriv->isOn != XV_OFF)) { /* overlaid still/image */ pWin = (WindowPtr)pPriv->pDraw;
pWin = (WindowPtr)pPriv->pDraw;
if ((pPriv->AdaptorRec->ReputImage) && if (pPriv->isOn == XV_OFF || !pWin)
((pWin->visibility == VisibilityUnobscured) || continue;
(pWin->visibility == VisibilityPartiallyObscured)))
{ visible = pWin->visibility == VisibilityUnobscured ||
xf86XVReputImage(pPriv); pWin->visibility == VisibilityPartiallyObscured;
} else if (pPriv->isOn == XV_ON) {
(*pPriv->AdaptorRec->StopVideo)( /*
pPriv->pScrn, pPriv->DevPriv.ptr, FALSE); * Stop and remove still/images if
xf86XVRemovePortFromWindow(pWin, pPriv); * ReputImage isn't supported.
pPriv->isOn = XV_PENDING; */
continue; if (!pPriv->type && !pPriv->AdaptorRec->ReputImage)
} visible = FALSE;
}
xf86XVReputOrStopPort(pPriv, pWin, visible);
} }
} }
} }