[PATCH] xfixes: Forbid manipulating clip for source-only pictures (#28968)

Keith Packard keithp at keithp.com
Mon Apr 21 21:51:33 PDT 2014


Adam Jackson <ajax at redhat.com> writes:

> Just throw BadPicture instead of crashing.  It's not currently a
> meaningful thing to do anyway, RenderSetPictureRectangles would error if
> you tried (which this patch changes to BadPicture as well for
> consistency).  The problem with trying to do it is if the clip is
> specified as a pixmap then we try to convert it to a region, and
> ->BitmapToRegion requires a ScreenPtr, and source-only pictures don't
> have one.

And source-only pictures can't get a CT_PIXMAP set -- CPClipMask returns
BadDrawable when you try to do that on a picture without a drawable.

If you saw this in real life, then you'd have found a bug in the server
elsewhere and we'll want to track that down...

If it were possible to set a bitmap clip on a source-only picture, then
a trivial fix would be to pull the screen out of the bitmap.

In any case,

Nak'd-by: Keith Packard <keithp at keithp.com>

-- 
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 810 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140421/65e9c225/attachment.sig>


More information about the xorg-devel mailing list