test/cairo-test-suite reports wrong max diff comparing different opaque images
Submitted by Massimo
Assigned to Chris Wilson @ickle
Description
In test/buffer-diff.c (line 80), when two pixels differ, all channels are considered to compute result.max_diff, this means in the case of rgb24 images also the meaningless alpha channel.
Similarly pdiff_compare in test/pdiff/pdiff.c uses the (non)alpha channel to unpremultiply the not premultiplied rgb channels, hardly giving the expected results.
Probably there should be a test-suite for pdiff to check for false positive/negative.
This results in many image.rgb24 failures that would be accepted using the same criterion used for image.argb32 target making the cairo test-suite output quite confusing.
BTW to slightly speed up the test-suite you could write and use a 'pdiff_compare_fast' that returns 1 the first time pixels_failed is incremented.
The best way to speed up the test-suite is to have all tests PASS though.