aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/render/mipict.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
committermarha <marha@users.sourceforge.net>2009-09-06 18:48:27 +0000
commita915739887477b28d924ecc8417ee107d125bd6c (patch)
treec02f315476b61892d1fd89182e18943dce8d6277 /xorg-server/render/mipict.c
parent6f25a23db1df27e992c34f6fd4c82e83c44fc2e2 (diff)
downloadvcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.gz
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.tar.bz2
vcxsrv-a915739887477b28d924ecc8417ee107d125bd6c.zip
Switched to xorg-server-1.6.99.900.tar.gz
Diffstat (limited to 'xorg-server/render/mipict.c')
-rw-r--r--xorg-server/render/mipict.c56
1 files changed, 24 insertions, 32 deletions
diff --git a/xorg-server/render/mipict.c b/xorg-server/render/mipict.c
index 2fadd8c36..71f3de718 100644
--- a/xorg-server/render/mipict.c
+++ b/xorg-server/render/mipict.c
@@ -313,32 +313,24 @@ miClipPictureSrc (RegionPtr pRegion,
int dx,
int dy)
{
- /* XXX what to do with clipping from transformed pictures? */
- if (pPicture->transform || !pPicture->pDrawable)
- return TRUE;
- if (pPicture->repeat)
+ if (pPicture->clientClipType != CT_NONE)
{
- if (pPicture->clientClipType != CT_NONE)
- {
- pixman_region_translate ( pRegion,
- dx - pPicture->clipOrigin.x,
- dy - pPicture->clipOrigin.y);
- if (!REGION_INTERSECT (pScreen, pRegion, pRegion,
- (RegionPtr) pPicture->pCompositeClip)) // clientClip))
- return FALSE;
- pixman_region_translate ( pRegion,
- - (dx - pPicture->clipOrigin.x),
- - (dy - pPicture->clipOrigin.y));
- }
- return TRUE;
- }
- else
- {
- return miClipPictureReg (pRegion,
- pPicture->pCompositeClip,
- dx,
- dy);
+ Bool result;
+
+ pixman_region_translate ( pPicture->clientClip,
+ pPicture->clipOrigin.x - dx,
+ pPicture->clipOrigin.y - dy);
+
+ result = REGION_INTERSECT (pScreen, pRegion, pRegion, pPicture->clientClip);
+
+ pixman_region_translate ( pPicture->clientClip,
+ - (pPicture->clipOrigin.x - dx),
+ - (pPicture->clipOrigin.y - dy));
+
+ if (!result)
+ return FALSE;
}
+ return TRUE;
}
void
@@ -358,8 +350,6 @@ miCompositeSourceValidate (PicturePtr pPicture,
if (pScreen->SourceValidate)
{
- x -= pPicture->pDrawable->x;
- y -= pPicture->pDrawable->y;
if (pPicture->transform)
{
xPoint points[4];
@@ -394,6 +384,8 @@ miCompositeSourceValidate (PicturePtr pPicture,
width = xmax - xmin;
height = ymax - ymin;
}
+ x += pPicture->pDrawable->x;
+ y += pPicture->pDrawable->y;
(*pScreen->SourceValidate) (pDrawable, x, y, width, height);
}
}
@@ -403,7 +395,7 @@ miCompositeSourceValidate (PicturePtr pPicture,
* an allocation failure, but rendering ignores those anyways.
*/
-_X_EXPORT Bool
+Bool
miComputeCompositeRegion (RegionPtr pRegion,
PicturePtr pSrc,
PicturePtr pMask,
@@ -459,8 +451,8 @@ miComputeCompositeRegion (RegionPtr pRegion,
if (pSrc->alphaMap)
{
if (!miClipPictureSrc (pRegion, pSrc->alphaMap,
- xDst - (xSrc + pSrc->alphaOrigin.x),
- yDst - (ySrc + pSrc->alphaOrigin.y)))
+ xDst - (xSrc - pSrc->alphaOrigin.x),
+ yDst - (ySrc - pSrc->alphaOrigin.y)))
{
pixman_region_fini (pRegion);
return FALSE;
@@ -477,8 +469,8 @@ miComputeCompositeRegion (RegionPtr pRegion,
if (pMask->alphaMap)
{
if (!miClipPictureSrc (pRegion, pMask->alphaMap,
- xDst - (xMask + pMask->alphaOrigin.x),
- yDst - (yMask + pMask->alphaOrigin.y)))
+ xDst - (xMask - pMask->alphaOrigin.x),
+ yDst - (yMask - pMask->alphaOrigin.y)))
{
pixman_region_fini (pRegion);
return FALSE;
@@ -612,7 +604,7 @@ miRenderPixelToColor (PictFormatPtr format,
}
}
-_X_EXPORT Bool
+Bool
miPictureInit (ScreenPtr pScreen, PictFormatPtr formats, int nformats)
{
PictureScreenPtr ps;