[cairo] win32 backend failure with Cairo 1.0.4

Carl Worth cworth at cworth.org
Mon Jun 19 08:00:32 PDT 2006


On Mon, 19 Jun 2006 03:04:37 -0700 (PDT), Mikael Claesson wrote:
>
> The Cairo 1.0.4 win32 backend fails when the screen
> has a depth of 16 bpp. There is a test in
> cairo_win32_surface_create() which selects a
> cairo_format_t based on the current screen depth, and
> it only works for a limited number of depths (32, 24,
> 8 and 1). Cairo 1.0.2 always uses CAIRO_FORMAT_RGB24
> and that seems to work fine for a depth of 16 bpp.
> Would it be ok to make the win32 backend default to
> CAIRO_FORMAT_RGB24 when it can't find an exact match?

We did recently fix this within the 1.1 series. I hadn't realized that
this was a regression that managed to sneak in between 1.0.2 and 1.0.4
though.

If the 1.2.0 release weren't coming out so soon I'd say it would
probably make sense to do a 1.0.6 to fix this. But 1.2 really will be
soon, so it's probably not necessary.

> Also, it seems strange that the function returns with
> a CAIRO_STATUS_NO_MEMORY error when memory has nothing
> to do with it. Atleast that kept me confused for a
> while.

Yes, that was another bug on top of the first. Sorry about that.

> I haven't tried any of the unstable releases, but
> looking at the source code for Cairo 1.1.10 it seems
> that CAIRO_FORMAT_RGB24 is chosen for 16 bpp.

Yup.

-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.freedesktop.org/archives/cairo/attachments/20060619/049dd171/attachment.pgp


More information about the cairo mailing list