Created attachment 17453 [details] [review] patch _surfaces_compatible in cairo-xlib-surface returns true for surfaces with different xrender_format when each has the same depth and no (NULL) visual. Common picture formats will not have the same depth, but it is possible to create a surface with a non-standard xrender_format having the same depth as another xrender_format with cairo_xlib_surface_create_with_xrender_format. Both cairo_xlib_surface_create_with_xrender_format and _cairo_xlib_surface_create_similar_with_format create surfaces with no visual. The same issue exists in the xcb backend.
Thanks for the patch, Karl, pushed as commit d52b55cb1b2a4e9b5fd8dd12592a227f8f6a93fc.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.