test: safeguard the scaling-bench test against COW
authorSiarhei Siamashka <siarhei.siamashka@gmail.com>
Thu, 5 Sep 2013 05:07:52 +0000 (08:07 +0300)
committerSøren Sandmann Pedersen <ssp@redhat.com>
Sat, 7 Sep 2013 21:20:09 +0000 (17:20 -0400)
commite43cc9c9024957dcc7f160f6abe7be218667dfa2
treed771b84ca3ee1d2491736362c7002ef148e774d7
parenta4c79d695d52c94647b1aff78548e5892d616b70
test: safeguard the scaling-bench test against COW

The calloc call from pixman_image_create_bits may still
rely on http://en.wikipedia.org/wiki/Copy-on-write
Explicitly initializing the destination image results in
a more predictable behaviour.

V2:
 - allocate 16 bytes aligned buffer with aligned stride instead
   of delegating this to pixman_image_create_bits
 - use memset for the allocated buffer instead of pixman solid fill
 - repeat tests 3 times and select best results in order to filter
   out even more measurement noise
test/scaling-bench.c