test: Make stress-test more likely to actually composite something
authorSøren Sandmann Pedersen <ssp@redhat.com>
Sun, 1 Jul 2012 10:53:18 +0000 (06:53 -0400)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Mon, 2 Jul 2012 22:21:21 +0000 (18:21 -0400)
commit7b20ad39f778d765566d3f2c5f7c50964100efc1
tree2ce189fc09fddea595f3e6ca5bd56b04af9ed969
parent4cdf8e9f3aca1925aeca25debb9268877ba3cd3d
test: Make stress-test more likely to actually composite something

stress-test current almost never composites anything because the clip
rectangles and transformations are such that either
_pixman_compute_composite_region32() or analyze_extent() will return
FALSE.

Fix this by:

- making log_rand() return smaller numbers so that the clip rectangles
  are more likely to be within the destination image

- adding rand_x() and rand_y() functions that pick positions within an
  image and using them for positioning alpha maps and source/mask
  positions.

- making it less likely that clip regions are used in general

These changes make the test take longer, so speed it up a little by
making most images smaller and by reducing the maximum convolution
filter from 17x19 to 3x4.

With these changes, stress-test reveals a crash in iteration 0xd39
where fast_composite_tiled_repeat() creates an indexed image without a
palette.
test/stress-test.c