summaryrefslogtreecommitdiff
path: root/xfixes
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2014-10-08 17:20:33 +0200
committerKeith Packard <keithp@keithp.com>2014-10-23 14:35:49 -0700
commit462bf87c4d1c2211dd49a5ce62d01ff84ff33970 (patch)
tree397fba28721adaf3a3c4469a589d59072516bffb /xfixes
parent3f4edd2e3ff84c38df563b09c2e8c32404db38f7 (diff)
downloadxserver-462bf87c4d1c2211dd49a5ce62d01ff84ff33970.tar.gz
render: Always store client clip as a region
This does have one semantic change. FixesCreateRegionFromPicture used to throw BadImplementation if you tried to create a region from a picture with no client clip. I changed that to BadMatch here since that more honestly describes what's going on. Signed-off-by: Adam Jackson <ajax@redhat.com> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'xfixes')
-rw-r--r--xfixes/region.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/xfixes/region.c b/xfixes/region.c
index f9de52542..4cfeee1a1 100644
--- a/xfixes/region.c
+++ b/xfixes/region.c
@@ -272,20 +272,12 @@ ProcXFixesCreateRegionFromPicture(ClientPtr client)
if (!pPicture->pDrawable)
return RenderErrBase + BadPicture;
- switch (pPicture->clientClipType) {
- case CT_PIXMAP:
- pRegion = BitmapToRegion(pPicture->pDrawable->pScreen,
- (PixmapPtr) pPicture->clientClip);
- if (!pRegion)
- return BadAlloc;
- break;
- case CT_REGION:
+ if (pPicture->clientClip) {
pRegion = XFixesRegionCopy((RegionPtr) pPicture->clientClip);
if (!pRegion)
return BadAlloc;
- break;
- default:
- return BadImplementation; /* assume sane server bits */
+ } else {
+ return BadMatch;
}
if (!AddResource(stuff->region, RegionResType, (void *) pRegion))