[cairo] win32 backend failure with Cairo 1.0.4

Mikael Claesson miclaes at yahoo.com
Mon Jun 19 03:04:37 PDT 2006


Hello.

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?

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.

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.

Kind regards

Mikael Claesson


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the cairo mailing list