From 1dea828023b15869ac1ba4e80862c56e77795ac4 Mon Sep 17 00:00:00 2001 From: Austin Yuan Date: Mon, 13 Apr 2009 10:22:22 -0400 Subject: [PATCH] Xvideo: remove the limitation that XvPutImage can't draw into pixmap Driver can return a failure if driver can't support drawing into pixmap (e.g. overlay) Signed-off-by: Austin Yuan --- hw/xfree86/common/xf86xv.c | 25 +------------------------ 1 files changed, 1 insertions(+), 24 deletions(-) diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index abbe033..913a254 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -1359,12 +1359,6 @@ xf86XVPutVideo( XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); int result; - /* No dumping video to pixmaps... For now anyhow */ - if(pDraw->type != DRAWABLE_WINDOW) { - pPort->pDraw = (DrawablePtr)NULL; - return BadAlloc; - } - /* If we are changing windows, unregister our port in the old window */ if(portPriv->pDraw && (portPriv->pDraw != pDraw)) xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); @@ -1411,9 +1405,6 @@ xf86XVPutStill( int ret = Success; Bool clippedAway = FALSE; - if (pDraw->type != DRAWABLE_WINDOW) - return BadAlloc; - if(!portPriv->pScrn->vtSema) return Success; /* Success ? */ pScreen = pDraw->pScreen; @@ -1511,12 +1502,6 @@ xf86XVGetVideo( XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); int result; - /* No pixmaps... For now anyhow */ - if(pDraw->type != DRAWABLE_WINDOW) { - pPort->pDraw = (DrawablePtr)NULL; - return BadAlloc; - } - /* If we are changing windows, unregister our port in the old window */ if(portPriv->pDraw && (portPriv->pDraw != pDraw)) xf86XVRemovePortFromWindow((WindowPtr)(portPriv->pDraw), portPriv); @@ -1563,9 +1548,6 @@ xf86XVGetStill( int ret = Success; Bool clippedAway = FALSE; - if (pDraw->type != DRAWABLE_WINDOW) - return BadAlloc; - if(!portPriv->pScrn->vtSema) return Success; /* Success ? */ pScreen = pDraw->pScreen; @@ -1622,9 +1604,6 @@ xf86XVStopVideo( ){ XvPortRecPrivatePtr portPriv = (XvPortRecPrivatePtr)(pPort->devPriv.ptr); - if(pDraw->type != DRAWABLE_WINDOW) - return BadAlloc; - xf86XVRemovePortFromWindow((WindowPtr)pDraw, portPriv); if(!portPriv->pScrn->vtSema) return Success; /* Success ? */ @@ -1710,9 +1689,7 @@ xf86XVPutImage( BoxRec WinBox; int ret = Success; Bool clippedAway = FALSE; - - if (pDraw->type != DRAWABLE_WINDOW) - return BadAlloc; + if(!portPriv->pScrn->vtSema) return Success; /* Success ? */ -- 1.5.4.5