summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@nokia.com>2010-10-29 17:05:02 +0300
committerVille Syrjälä <ville.syrjala@nokia.com>2010-11-26 18:01:05 +0200
commit6051c7e940767b7120ad9c7e9188aee6a6f62b94 (patch)
treef7ce33067b3dbb27995f2a88b1402cf4bf9712a4
parent27707ac5bdf6831630944f02f2128951a529faab (diff)
xfree86/xv: Change the behaviour of ClipNotify to reput instead of stop
When ClipNotify gets called for a visible window, reput instead of stopping the port. This eliminates nasty overlay flickering that happens during clip changes. If the window is invisible or if ReputImage isn't supported stop and remove the port from the window as was done before. Signed-off-by: Ville Syrjälä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
-rw-r--r--hw/xfree86/common/xf86xv.c28
1 files changed, 10 insertions, 18 deletions
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 4ed117709..cbbff40ba 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -1116,10 +1116,11 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
XF86XVScreenPtr ScreenPriv = GET_XF86XV_SCREEN(pScreen);
XF86XVWindowPtr WinPriv = GET_XF86XV_WINDOW(pWin);
XvPortRecPrivatePtr pPriv;
- Bool visible = (pWin->visibility == VisibilityUnobscured) ||
- (pWin->visibility == VisibilityPartiallyObscured);
while(WinPriv) {
+ Bool visible = pWin->visibility == VisibilityUnobscured ||
+ pWin->visibility == VisibilityPartiallyObscured;
+
pPriv = WinPriv->PortRec;
if(pPriv->pCompositeClip && pPriv->FreeCompositeClip)
@@ -1131,24 +1132,15 @@ xf86XVClipNotify(WindowPtr pWin, int dx, int dy)
(*pPriv->AdaptorRec->ClipNotify)(pPriv->pScrn, pPriv->DevPriv.ptr,
pWin, dx, dy);
- /* Stop everything except images, but stop them too if the
- window isn't visible. But we only remove the images. */
-
- if(pPriv->type || !visible) {
- if(pPriv->isOn == XV_ON) {
- (*pPriv->AdaptorRec->StopVideo)(
- pPriv->pScrn, pPriv->DevPriv.ptr, FALSE);
- pPriv->isOn = XV_PENDING;
- }
-
- if(!pPriv->type) { /* overlaid still/image */
- WinPriv = WinPriv->next;
- xf86XVRemovePortFromWindow(pWin, pPriv);
- continue;
- }
- }
+ /*
+ * Stop and remove still/images if
+ * ReputImage isn't supported.
+ */
+ if (!pPriv->type && !pPriv->AdaptorRec->ReputImage)
+ visible = FALSE;
WinPriv = WinPriv->next;
+ xf86XVReputOrStopPort(pPriv, pWin, visible);
}
if(ScreenPriv->ClipNotify) {