The part that computes the pixel format is not 64bit safe. Without the attached patch, the value of masks.alpha_mask for an ARGB32 surface is computed as 0xFFFFFFFFFF000000 instead of the correct 0xFF000000. The patch adds explicit casts to prevent this sign extension. Without the patch all test cases using the xlib backend fail because the png-writing code doesn't recognize the image format.
Created attachment 3096 [details] x.org.0.log with i810 driver, 6.8.99.15
2005-07-16 Owen Taylor <otaylor@redhat.com> Patch from Martin Kretzschmar <martink@gnome.org>, #3798 * src/cairo-xlib-surface.c (_get_image_surface): prevent sign-extension of masks.*_mask on 64bit architectures. * src/cairo-xcb-surface.c (_get_image_surface): ditto. I didn't make the 0xffffffff => 0xffffffffUL changes because: - A long constant wasn't actually needed - We don't mark them elsewhere - The code might (or might not) be a tiny bit more compact with a shorter constant Please reopen if I'm missing something.
Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.