mirror of
https://github.com/X11Libre/xserver.git
synced 2026-09-18 19:52:21 +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:
parent
3f4edd2e3f
commit
462bf87c4d
6 changed files with 13 additions and 43 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Reference in a new issue