summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@nokia.com>2010-10-29 17:00:24 +0300
committerVille Syrjälä <ville.syrjala@nokia.com>2010-11-26 18:01:05 +0200
commit27707ac5bdf6831630944f02f2128951a529faab (patch)
treeb691bf5cc866376ee1e56ffb1aad819e8f6fcae9 /hw
parent38987aae199982f17eae664f3a28ff5941d3ee73 (diff)
xfree86/xv: Allow xf86XVReputOrStopPort() to stop PutVideo/GetVideo ports
Modify xf86XVReputOrStopPort() to allow stopping of all types of ports. Will be useful later. No functional change. 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.c33
1 files changed, 23 insertions, 10 deletions
diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c
index 581e8a7a3..4ed117709 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -1007,8 +1007,20 @@ xf86XVRemovePortFromWindow(WindowPtr pWin, XvPortRecPrivatePtr portPriv)
static void
xf86XVReputOrStopPort(XvPortRecPrivatePtr pPriv,
WindowPtr pWin,
- Bool AreasExposed)
+ Bool visible)
{
+ if (!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*/
+ xf86XVRemovePortFromWindow(pWin, pPriv);
+
+ return;
+ }
+
switch (pPriv->type) {
case XvInputMask:
xf86XVReputVideo(pPriv);
@@ -1019,14 +1031,6 @@ xf86XVReputOrStopPort(XvPortRecPrivatePtr pPriv,
default: /* overlaid still/image*/
if (pPriv->AdaptorRec->ReputImage)
xf86XVReputImage(pPriv);
- else if (AreasExposed) {
- if (pPriv->isOn == XV_ON) {
- (*pPriv->AdaptorRec->StopVideo)(pPriv->pScrn, pPriv->DevPriv.ptr, FALSE);
- pPriv->isOn = XV_PENDING;
- }
-
- xf86XVRemovePortFromWindow(pWin, pPriv);
- }
break;
}
}
@@ -1088,10 +1092,19 @@ xf86XVWindowExposures(WindowPtr pWin, RegionPtr reg1, RegionPtr reg2)
if (!pWin->valdata) return;
while(WinPriv) {
+ Bool visible = TRUE;
+
pPriv = WinPriv->PortRec;
+ /*
+ * Stop and remove still/images if areas were exposed and
+ * ReputImage isn't supported.
+ */
+ if (!pPriv->type && !pPriv->AdaptorRec->ReputImage)
+ visible = !AreasExposed;
+
WinPriv = WinPriv->next;
- xf86XVReputOrStopPort(pPriv, pWin, AreasExposed);
+ xf86XVReputOrStopPort(pPriv, pWin, visible);
}
}