summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86xv.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@nokia.com>2010-11-01 20:02:40 +0200
committerVille Syrjälä <ville.syrjala@nokia.com>2010-11-26 18:01:05 +0200
commit7294236bdb29b4fa7a7bc27aff9c786c5a33c544 (patch)
tree889576a173088f1304f648e0eea5af43a218d458 /hw/xfree86/common/xf86xv.c
parent47d8bd0a999693f47fd244dc876ef7f8fcd52854 (diff)
xfree86/xv: Remove clipOrg from XvPortRecPrivate
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ä <ville.syrjala@nokia.com> Reviewed-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
Diffstat (limited to 'hw/xfree86/common/xf86xv.c')
-rw-r--r--hw/xfree86/common/xf86xv.c6
1 files changed, 3 insertions, 3 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;