reftest-compare: Treat colour channels as undefined if alpha is zero
authorSimon McVittie <smcv@debian.org>
Thu, 2 Sep 2021 21:34:14 +0000 (22:34 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 31 Oct 2021 21:52:04 +0000 (17:52 -0400)
commite67e51be14f1d96d39481e9beb8b4e18f68d8af8
treefb7f16fce9e21f6e82a8923dce0dac75affcb875
parenteab7c19dfb104da871de4e426967475007af311c
reftest-compare: Treat colour channels as undefined if alpha is zero

If the alpha channel is zero, it doesn't matter what the values of the
red, green and blue channels are: the pixel is still fully transparent.
On most architectures, fully transparent pixels end up all-zeroes
(fully transparent black), matching what's in the reference PNG file;
but on mips*el the blend-difference and blend-normal tests get all-ones
(fully transparent white) and a test failure.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4227
Signed-off-by: Simon McVittie <smcv@debian.org>
testsuite/reftests/reftest-compare.c