Commit Graph

8 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
83f6e2eacf Reindent and rename identifiers in scaling-test.c 2009-07-13 19:58:04 -04:00
Siarhei Siamashka
51418786e4 Return nonzero code from scaling-test program in case of failure.
This can potentially help in tests automation.
2009-07-10 13:50:15 -04:00
Siarhei Siamashka
71862fe84e Fix scaling-test to work on big endian systems 2009-07-10 13:50:15 -04:00
Søren Sandmann Pedersen
0fce356762 Add workarounds for X servers doing out-of-bounds accesses.
Old X servers rely on out-of-bounds accesses when they are asked
to composite with a window as the source. They create a pixman image
pointing to some bogus position in memory, but then they set a clip
region to the position where the actual bits are.

Due to a bug in old versions of pixman, where it would not clip
against the image bounds when a clip region was set, this would
actually work.

The workaround added by this commit is to try and detect whether a
source drawable is actually a window without a client clip set. Such a
window will generally have a clip region that corresponds exactly to
the hierarchy clip in the server, whereas pixmaps will have a clip
region that is an exact match to the drawable.

When we detect such a window, we allow a fast path to run that would
normally be rejected due to the sources not completely subsuming the
composite region.

Fixed X servers should call the new function
pixman_disable_out_of_bounds_workaround() to disable the workaround.

This was reported in bug 22484.
2009-07-10 02:57:09 -04:00
Søren Sandmann Pedersen
6b34482870 Update the CRC value in scaling-test.c.
The changes in pixman behavior justifying this are:

- New clipping rules

- Bug fixes in region code. In particular, when
  pixman_region_init_rects() is called on these two boxes:

	{ 2, 6, 7, 6 }
	{ 4, 1, 6, 7 }

  it now ignores the first one, which is empty and produces

	{ 4, 1, 6, 7 }

  Previously, it would produce:

	{ 2, 1, 7, 7 }

  for some reason.
2009-07-09 04:04:00 -04:00
Siarhei Siamashka
21034db1da Scaling test updated to provide better coverage for problematic cases
Now scaling test should reliably detect problems in new scaling code.
Maximum image size reduced to improve performance (more tests can be
run per second) and also simplify detected errors analysis.
2009-05-29 22:23:22 -04:00
Siarhei Siamashka
dbb72c02fd Updated scaling test to support rgb565, source clipping, etc.
Now test provides better coverage for various image scaling
cases. Unused byte for x8r8g8b8 format is ignored. Running
the test program without any command line options provides
a PASS/FAIL verdict based on the precalculated crc32 value
for using pixman with all the fastpath functions disabled,
which should simplify testing for correcteness.
2009-04-24 21:51:30 -04:00
Siarhei Siamashka
a9adae3dc3 Image scaling regression test script
This test script can help in finding regressions in image scaling
fastpath implementations. It uses test program compiled with
and without fastpath code and can compare results of execution
for different pseudorandom compositing operations involving scaling.

Signed-off-by: Søren Sandmann Pedersen <sandmann@redhat.com>
2009-03-31 21:30:03 -04:00