[cairo] New guards for cairo_xlib_surface_create_with_xrender_format()
Carl Worth
cworth at cworth.org
Wed Apr 2 09:41:26 PDT 2008
On Wed, 02 Apr 2008 16:53:52 +0100, Chris Wilson wrote:
> On Wed, 2008-04-02 at 07:54 -0700, Carl Worth wrote:
> > If there's a XRender format then we've got masks.
>
> No, the crash Frederic Crozat originally reported was triggered by a
> similar surface to an 8-bit colour surface. XRender happily wrapped the
> pseudocolor Visual into its own XRenderPictFormat with
> (gdb) p *xrender_format
> $1 = {id = 56, type = PictTypeIndexed, depth = 8, direct = {red = 0,
> redMask = 0, green = 0, greenMask = 0, blue = 0, blueMask = 0,
> alpha = 0, alphaMask = 0}, colormap = 32}
OK, I was totally wrong about the XRenderPictFormat only being for
TrueColor.
But notice that all the information we are currently getting out of
the visual is here as well, (PictTypeIndexed and colormap 32). So we
should still be able to support this case just fine, by either:
1. Coding up the fallback to deal with either a Visual or an
XRenderPictFormat
or
2. Finding the Visual that corresponds to the
XRenderPictFormat and let the existing fallback code use
that.
-Carl
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080402/a5b700be/attachment.pgp
More information about the cairo
mailing list