summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@nokia.com>2010-10-29 17:14:34 +0300
committerVille Syrjälä <ville.syrjala@nokia.com>2010-11-26 18:01:05 +0200
commit3d4d0237a3981820a9b7290f69c7172a48659a10 (patch)
tree0addf9bf17fcc3e9f422d3ec911ee05add6c2e6c /hw
parentd794be81218934ad4580211c7a0a27cb71eb5d60 (diff)
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>
Diffstat (limited to 'hw')
-rw-r--r--hw/xfree86/common/xf86xv.c32
1 files changed, 17 insertions, 15 deletions
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 59232a85d..f70a2ef04 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -1286,24 +1286,26 @@ xf86XVAdjustFrame(int index, int x, int y, int flags)
XvPortRecPrivatePtr pPriv;
for(i = pa->nPorts; i > 0; i--, pPort++) {
+ Bool visible;
+
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) &&
- ((pWin->visibility == VisibilityUnobscured) ||
- (pWin->visibility == VisibilityPartiallyObscured)))
- {
- xf86XVReputImage(pPriv);
- } else if (pPriv->isOn == XV_ON) {
- (*pPriv->AdaptorRec->StopVideo)(
- pPriv->pScrn, pPriv->DevPriv.ptr, FALSE);
- xf86XVRemovePortFromWindow(pWin, pPriv);
- pPriv->isOn = XV_PENDING;
- continue;
- }
- }
+ if (pPriv->isOn == XV_OFF || !pWin)
+ continue;
+
+ visible = pWin->visibility == VisibilityUnobscured ||
+ pWin->visibility == VisibilityPartiallyObscured;
+
+ /*
+ * Stop and remove still/images if
+ * ReputImage isn't supported.
+ */
+ if (!pPriv->type && !pPriv->AdaptorRec->ReputImage)
+ visible = FALSE;
+
+ xf86XVReputOrStopPort(pPriv, pWin, visible);
}
}
}