Yet another reason window pictures suck

Chris Wilson chris at chris-wilson.co.uk
Fri May 21 09:10:59 PDT 2010


On Fri, 21 May 2010 11:44:39 -0400, Adam Jackson <ajax at redhat.com> wrote:
> Context:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=533879
> 
> If you've got a 24bpp framebuffer, you poor misguided soul you, then you
> have a conundrum.  Pixmaps are 32bpp but Windows aren't.  Suppose you
> make a Picture out of a Window.  You would think you'd be required to
> use one of the Formats with an associated Visual.  What does the spec
> say about it?
> 
[...]
> 
> b) Fix the spec to be more strict, and fix cairo and whoever else to be
> more careful about picking Visual Formats for Window Pictures.

The bad news here is that the XRenderFormat chosen (for
cairo_xlib_surface_create_with_xrender_format()) is entirely the
responsibility of the application. Visuals are mapped to XRenderFormats
using the mapping supplied by RenderQueryPictFormats. Cairo itself
only creates [ax]rgb32 (and a8) pixmaps. So we would need to teach the
toolkits to handle 24bpp Windows.

The implementation should be fixed though, let's return BadMatch and
stop this silent corruption.
-ickle

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the xorg-devel mailing list