From 7294236bdb29b4fa7a7bc27aff9c786c5a33c544 Mon Sep 17 00:00:00 2001 From: Ville Syrjälä Date: Mon, 1 Nov 2010 20:02:40 +0200 Subject: xfree86/xv: Remove clipOrg from XvPortRecPrivate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clipOrg never changes except when clientClip changes, so instead of keeping copies of both originals translate clientClip by clipOrg immediately and just keep the translated clientClip. Signed-off-by: Ville Syrjälä Reviewed-by: Luc Verhaegen --- hw/xfree86/common/xf86xv.c | 6 +++--- hw/xfree86/common/xf86xvpriv.h | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/xfree86/common/xf86xv.c b/hw/xfree86/common/xf86xv.c index e4c50825d..8ccdf065a 100644 --- a/hw/xfree86/common/xf86xv.c +++ b/hw/xfree86/common/xf86xv.c @@ -661,8 +661,7 @@ xf86XVUpdateCompositeClip(XvPortRecPrivatePtr portPriv) pCompositeClip = RegionCreate(NullBox, 1); RegionCopy(pCompositeClip, portPriv->clientClip); RegionTranslate(pCompositeClip, - portPriv->pDraw->x + portPriv->clipOrg.x, - portPriv->pDraw->y + portPriv->clipOrg.y); + portPriv->pDraw->x, portPriv->pDraw->y); RegionIntersect(pCompositeClip, pregWin, pCompositeClip); portPriv->pCompositeClip = pCompositeClip; @@ -687,6 +686,8 @@ xf86XVCopyClip( portPriv->clientClip = RegionCreate(NullBox, 1); /* Note: this is in window coordinates */ RegionCopy(portPriv->clientClip, pGC->clientClip); + RegionTranslate(portPriv->clientClip, + pGC->clipOrg.x, pGC->clipOrg.y); } else if(portPriv->clientClip) { /* free the old clientClip */ RegionDestroy(portPriv->clientClip); portPriv->clientClip = NULL; @@ -697,7 +698,6 @@ xf86XVCopyClip( RegionDestroy(portPriv->pCompositeClip); } - portPriv->clipOrg = pGC->clipOrg; portPriv->pCompositeClip = pGC->pCompositeClip; portPriv->FreeCompositeClip = FALSE; portPriv->subWindowMode = pGC->subWindowMode; diff --git a/hw/xfree86/common/xf86xvpriv.h b/hw/xfree86/common/xf86xvpriv.h index 7623d297d..3191c4c7a 100644 --- a/hw/xfree86/common/xf86xvpriv.h +++ b/hw/xfree86/common/xf86xvpriv.h @@ -67,7 +67,6 @@ typedef struct { DrawablePtr pDraw; unsigned char type; unsigned int subWindowMode; - DDXPointRec clipOrg; RegionPtr clientClip; RegionPtr pCompositeClip; Bool FreeCompositeClip; -- cgit v1.2.3