[Pixman] Broken colours on big endian machines since b4a105d

Martin Husemann martin at NetBSD.org
Sun Dec 4 10:03:30 UTC 2022


Hey folks,

the commit 

https://github.com/freedesktop/pixman/commit/b4a105d77232a87304b7b621e2f99e699a8eebd3

breaks pixman for me on NetBSD/macppc in exactly the way it says it would
fix things: colours of scaled images are now wrong, this is noticable for
example with firefox and favicons displayed on the tab (for sites that
use coloured and bigger favicons), but also for some scaled images.

Removing that #ifdef WORDS_BIGENDIAN again makes it work fine (as previous
versions did, with no noticable fallout elsewhere in my testing).

My guess is either

 - buffer[] in this code is an internal representation only (supposed to
   be in host byte order) and later converted to a final image (and
   endianess is dealt with at that later stage), - or
 - some other endianess conversion is missing somewhere else, affecting
   the path firefox takes here but not the path Jocelyn originally tested
   - or
 - something else changed in some other code that also fixes Jocelyn's
   original problem and now the path converts endianess one time too many

Unfortunately the tests do not catch this issue.

Jocelyn, how did you originally test your commit? 

Martin


More information about the Pixman mailing list