mirror of
https://github.com/X11Libre/xserver.git
synced 2026-03-24 05:54:08 +00:00
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>
This commit is contained in:
committed by
Keith Packard
parent
3f4edd2e3f
commit
462bf87c4d
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user