stresstest: Ensure that the rasterizer is only given alpha formats
authorSøren Sandmann Pedersen <ssp@redhat.com>
Wed, 30 Jan 2013 01:23:31 +0000 (20:23 -0500)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Wed, 30 Jan 2013 01:43:51 +0000 (20:43 -0500)
commit349015e1fc5d912ba4253133b90e751d0b6ca7f2
tree0d6db3afecbaf8cf366f866422a1a99d98d20a85
parentafde862928da7ac927cf4b60a022fafe5f060d26
stresstest: Ensure that the rasterizer is only given alpha formats

In c2cb303d33ec11390b93cabd90f0f9, return_if_fail()s were added to
prevent the trapezoid rasterizers from being called with non-alpha
formats. However, stress-test actually does call the rasterizers with
non-alpha formats, but because _pixman_log_error() is disabled in
versions with an odd minor number, the errors never materialized.

Fix this by changing the argument to random format to an enum of three
values DONT_CARE, PREFER_ALPHA, or REQUIRE_ALPHA, and then in the
switch that calls the trapezoid rasterizers, pass the appropriate
value for the function in question.
test/stress-test.c