GNOME Bugzilla – Bug 668217
gdk_cairo_region_create_from_surface() broken on big endian
Last modified: 2012-01-21 01:09:58 UTC
Created attachment 205585 [details] Example program When using gdk_cairo_region_create_from_surface() on a big endian system, the points in the resulting region get reversed in horizontal groups of 8. I've attached an example program that clearly shows the problem, and I'll attach screenshots from running it on amd64 (little endian, works) and ppc (big endian, does not work). The output from the program when running on ppc is R 0: 0 R 1: 0 R 2: 0 R 3: 0 R 4: 0 R 5: 0 R 6: 0 R 7: 8 R 8: 8 R 9: 8 but the expected output is R 0: 1 R 1: 2 R 2: 3 R 3: 4 R 4: 5 R 5: 6 R 6: 7 R 7: 8 R 8: 9 R 9: 10 Since the text output is wrong, my conclusion is that the bug is in gdk_cairo_region_create_from_surface(), and not in gtk_widget_shape_combine_region().
Created attachment 205586 [details] Screenshot of example program running on amd64
Created attachment 205587 [details] Screenshot of example program running on ppc
Which version is this ? This is supposedly fixed by http://git.gnome.org/browse/gtk+/commit/?id=ab34c7989620db3890efdfb6849c64d5c70c1b76
It is from the Ubuntu package libgtk-3-0 version 3.2.0-0ubuntu4 (in the current release of Oneiric Ozelot). The README in the source tree says "This is GTK+ version 3.2.0.". Could you please confirm that the indicated fix was made after that release? It does indeed look highly relevant. Thanks // Marcus
I don't know what patches ubuntu includes in their gtk build, but 3.2.0 was released in September, and the fix I pointed you at was made in November
Ok, further investigation shows: * None of the Ubuntu patches touch gdkcairo * The code in the source archive looks like the "before" side of the fix * Adding the patch of the fix to debian/patches/series results in a working libgdk So I think it's safe to say that it is the same problem and the same fix. Sorry for the noise. // Marcus
Cool, thanks