I get many warnings like this: icbltone.c:461: warning: left shift count >= width of type I tracked it down to a problem in Mask24Pos(x,r) when BITMAP_BIT_ORDER != MSBFirst #if BITMAP_BIT_ORDER == MSBFirst #define Mask24Pos(x,r) ((x)*24-(r)) #else #define Mask24Pos(x,r) ((x)*24-((r) ? 24 - (r) : 0)) #endif When x=2 r=0 this produces a value of 48, which in Mask24(x,r) results in 0xffffff << 48 which is 72bits, i.e larger than uint64. I suspect this is the cause of the mashed PNG images reported on the cairo development list a couple of days ago. I haven't been able to identify a patch, because I still don't fully understand what this is doing. I'd spend more effort on it but I understand you have a major rewrite about to land in CVS and so perhaps you've fixed it already?
The "rewrite" is just moving some newer code over from the X server, but only for the trapezoid rasterization, (most of what is currently in ictrap.c will disappear). It won't affect the function you are looking at. I don't know offhand the details of whats going on in this function, so some investigation would be useful.
Right. The problem still exists with the latest updates. Do you happen to know what "BITMAP_BIT_ORDER != MSBFirst" means? Does it really imply bit-order reversal, or just byte order? Do you happen to have a description of bit/byte ordering on x86_64 as compared with i386 ?
The 64-bit code in fb (pixman) is probably broken; it hasn't been used in quite some time as PCI (and AGP) is 32-bits wide, so doing things 64-bits at a time is a net loss. To quickly fix this, I suggest just using 32-bit datatypes by setting IC_SHIFT to 5 for all machines.
Thanks, that fixes both the compile warnings (this bug) and the distortion of fonts from cairo-demo/png/text.c reported to the cairo list a few days ago. patch follows
Created attachment 1733 [details] [review] patch to pixman.h suggested by Keith
I've committed a fix for this, but have not tested on any 64-bit platforms. Please test and re-open the report if necessary.
Works for me on x86_64. Do you happen to know, or can you suggest a test to find out what this does to in-memory bitmaps? I'm hoping it doesn't double their size?
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.