[PATCH v2 09/15] xfree86/xv: Remove clipOrg from XvPortRecPrivate
ville.syrjala at nokia.com
ville.syrjala at nokia.com
Tue Nov 2 11:05:55 PDT 2010
From: Ville Syrjälä <ville.syrjala at nokia.com>
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 at nokia.com>
---
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 9b46549..955276d 100644
--- a/hw/xfree86/common/xf86xv.c
+++ b/hw/xfree86/common/xf86xv.c
@@ -664,8 +664,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;
@@ -690,6 +689,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;
@@ -700,7 +701,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 7623d29..3191c4c 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;
--
1.7.2.2
More information about the xorg-devel
mailing list