[cairo] New guards for cairo_xlib_surface_create_with_xrender_format()
chris at chris-wilson.co.uk
Wed Apr 2 03:34:07 PDT 2008
Whilst debugging an issue with psuedocolor support (namely that the
Visual was lost when creating a similar surface) I spotted that we allow
creation of a cairo_xlib_surface_t with insufficient information should
we need to perform fallbacks.
In cairo-xlib-surface.c::_get_image_surface(), if the XImage is not in a
supported pixman format, then we require information stored in the
surface's Visual to convert the pixel data into an appropriate pixman
format. If the user creates a surface via
cairo_xlib_surface_create_with_xrender_format(), then no Visual is
associated with the surface and hence fallback can not be performed
should the format be unsupported.
Is it preferable to prevent such surfaces being created in the first
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 0 bytes
Url : http://lists.cairographics.org/archives/cairo/attachments/20080402/1a03fc96/attachment.bin
More information about the cairo