summaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorSøren Sandmann Pedersen <sandmann@redhat.com>2009-06-13 10:55:04 -0400
committerSøren Sandmann Pedersen <sandmann@redhat.com>2009-06-18 12:36:11 -0400
commit128cd03eecacc6d5c5903d59a11966dcf3697bf1 (patch)
tree225256f074bb3a399a0607fe9de77ebf7df4a290 /render
parente9aa61e9f0d663d5b34a397b943b4d1df44e873d (diff)
Fix miComputeCompositeRegion() to follow new clip rules.
Ignore the hierarchy clip, and always apply any client clip after transformation and repeating.
Diffstat (limited to 'render')
-rw-r--r--render/mipict.c40
1 files changed, 16 insertions, 24 deletions
diff --git a/render/mipict.c b/render/mipict.c
index e0d40ae34..71f3de718 100644
--- a/render/mipict.c
+++ b/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