[Pixman] [RFC PATCH] solid-test: Allow for big-endian targets

Ben Avison bavison at riscosopen.org
Fri May 29 08:13:11 PDT 2015

On Fri, 29 May 2015 11:08:49 +0100, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> I think pixman_color needs to be pre-multiplied just like all other
> alpha formats, which means that the above way to randomize values into
> a pixman_color can produce "luminous" (or invalid?) colors.
> Would that raise undefined behaviour, or should we expect Pixman to
> handle also those cases always the same?

Yes, when you're dealing with pre-multiplied alpha, you're allowed to
have the RGB components exceed the alpha one, and this equates to a
"luminous" effect. Pixman uses saturated arithmetic throughout, so it
should be able to handle these (and so they need to be tested).

> Maybe the iteration count (500000 in fuzzer_test_main call) should also
> be increased?

[versus 2 million in blitters-test]

Well, I kind of settled on that on the basis of the runtime of the test
being similar to most of the other fuzz testers. Blitters-test is one of
the absolute slowest tests, and although it does include roughly the same
number of solid tests as this, they're very skewed towards solid masks
rather than solid sources and only test single-pixel bitmap images, so I
think the test as written is still usefully increasing the test coverage.

Updated patch to follow, as requested.


More information about the Pixman mailing list