[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg-devel
Subject: [PATCH 07/10] xfree86/xv: Change the behaviour of AdjustFrame to
From: ville.syrjala () nokia ! com
Date: 2010-10-29 18:19:03
Message-ID: 1288376346-13235-8-git-send-email-ville.syrjala () nokia ! com
[Download RAW message or body]
From: Ville Syrjälä <ville.syrjala@nokia.com>
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>
---
hw/xfree86/common/xf86xv.c | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 59232a8..f70a2ef 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);
}
}
}
--
1.7.2.2
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic