if (!dpy || (!CAIRO_SURFACE_RENDER_HAS_COMPOSITE (src) && format == CAIRO_FORMAT_ARGB32)) { return NULL;
if (!CAIRO_SURFACE_RENDER_HAS_COMPOSITE(src)) { return cairo_image_surface_create (format, width, height);
_cairo_xlib_surface_create_similar (void		*abstract_src,				    cairo_format_t	format,				    int			drawable,				    int			width,				    int			height){    cairo_xlib_surface_t *src = abstract_src;    Display *dpy = src->dpy;    int scr;    Pixmap pix;    cairo_xlib_surface_t *surface;    /* XXX: There's a pretty lame heuristic here. This assumes that     * all non-Render X servers do not support depth-32 pixmaps, (and     * that they do support depths 1, 8, and 24). Obviously, it would     * be much better to check the depths that are actually     * supported. */    if (!dpy	|| (!CAIRO_SURFACE_RENDER_HAS_COMPOSITE (src)	    && format == CAIRO_FORMAT_ARGB32))    {	return NULL;    }    scr = DefaultScreen (dpy);    pix = XCreatePixmap (dpy, DefaultRootWindow (dpy),			 width <= 0 ? 1 : width, height <= 0 ? 1 : height,			 _CAIRO_FORMAT_DEPTH (format));        surface = (cairo_xlib_surface_t *)	_cairo_xlib_surface_create_with_size (dpy, pix, NULL, format,					      DefaultColormap (dpy, scr),					      width, height);    surface->owns_pixmap = 1;    surface->width = width;    surface->height = height;    return &surface->base;}