Yet another reason window pictures suck
Soeren Sandmann
sandmann at daimi.au.dk
Fri May 21 18:22:02 PDT 2010
Chris Wilson <chris at chris-wilson.co.uk> writes:
> 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.
Is it actually silent corruption? pixman will explode spectactularly
if you give it a format that it doesn't know about.
Isn't the problem just that render advertises a bogus format that some
applications will then make use of?
Søren
More information about the xorg-devel
mailing list