Wrong colors on big endian systems
There is an endianness issue in pixman-fast-path.c
. In the function bits_image_fetch_separable_convolution_affine
we have this code:
#ifdef WORDS_BIGENDIAN
buffer[k] = (satot << 0) | (srtot << 8) | (sgtot << 16) | (sbtot << 24);
#else
buffer[k] = (satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0);
#endif
This will write out the pixels as BGRA on big endian systems but obviously that's wrong. Pixel order should be ARGB on big endian systems so we don't need any #ifdef
for big endian here at all. Instead, the code should be the same on little and big endian, i.e. it should be just this line instead of the 5 lines above:
buffer[k] = (satot << 24) | (srtot << 16) | (sgtot << 8) | (sbtot << 0);
Changing the code like this fixes the wrong colors that I get with pixman on my PowerPC system.