Commit Graph

70 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
e084351b13 Update CRC value in blitters-test.
At this point, the SIMD, SSE2, MMX and general implementations all
agree.
2009-08-08 18:52:55 -04:00
Søren Sandmann Pedersen
ba5c5325e7 Various formatting fixes 2009-08-08 18:50:42 -04:00
Søren Sandmann Pedersen
cc5c59b3f2 Add the ability to print intermediate CRC values 2009-08-08 18:50:42 -04:00
Søren Sandmann Pedersen
0bc4adae3e Reenable commented-out tests in blitter-test.
The crashes and valgrind issues are all fixed at this point.
2009-08-08 18:50:42 -04:00
Siarhei Siamashka
9ee18806a9 One more update to blitters-test - use aligned memory
allocations in order in order to make reproducibility
of alignment sensitive bugs more deterministic
Also testing of masks is reenabled
2009-08-08 18:50:42 -04:00
Siarhei Siamashka
4fc0f9dd45 HACK: updated test to better cover new neon optimizations 2009-08-08 18:50:41 -04:00
Siarhei Siamashka
67769ad5bf Test program for stressing the use of different formats and operators
The code and overall method is mostly based on scaling-test. This one
focuses on trying to stress as many different color formats and types
of composition operations as possible.

This is an initial implementation which may need more tuning. Also
not all color format and operator combinations are actually used.

When cpu specific optimizations are disabled, this test provides
identical deterministic results on x86, PPC and ARM.

Script blitters-test-bisect.rb now works in non-stop mode, until
it finds any problem. This allows to run it for example overnight
in order to test a lot more variants of pixman calls and increase
chances of detecting problems in pixman. Just like with scaling-test,
running blitters-test binary alone with no command line arguments
runs a small predefined number of tests and compares checksum
with a reference value for quick verification.
2009-08-08 18:50:41 -04:00
Søren Sandmann Pedersen
6bd17f1e98 Rework the workaround for bogus X server images.
Bug 22844 demonstrates that it is not sufficient to play tricks with
the clip regions to work around the bogus images from the X
server. The problem there is that if the operation hits the general
path and the destination has a different format than a8r8g8b8, the
destination pixels will be fetched into a temporary array. But because
those pixels would be outside the clip region, they would be fetched
as black. The previous workaround was relying on fast paths fetching
those pixels without checking the clip region.

In the new scheme we work around the problem at the
pixman_image_composite() level. If an image is determined to need a
work around, we translate both the bits pointer, the coordinates, and
the clip region, thus effectively undoing the X server's broken
computation.
2009-07-21 01:27:46 -04:00
Søren Sandmann Pedersen
dfdb8509e2 Add test case for bug 22844. 2009-07-21 01:27:46 -04:00
Søren Sandmann Pedersen
4df925bb28 Change composite test to use a rainbow gradient as source.
Also make the destination a yellow patch. This makes the output a bit
more comparable to the image in the PDF specification.
2009-07-16 09:45:32 -04:00
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
Søren Sandmann Pedersen
4c60ed5ec6 Fix bug in pixman-region.c where empty regions would not be properly initialized.
Also add a couple more tests to region-test.c.
2009-07-09 04:00:19 -04:00
Søren Sandmann Pedersen
bcf01c21d7 Fix a couple of problems with the tests when HAVE_GTK is not defined.
- Make sure the non-gtk+ test programs are added to noinst_PROGRAMS
  when HAVE_GTK is not set.

- Don't include glib.h in oob-test.c
2009-07-09 01:47:19 -04:00
Søren Sandmann Pedersen
706e659431 Add a box with y2 < y1 in region-test.c 2009-07-08 18:39:43 -04:00
Søren Sandmann Pedersen
2d32d91e5d Use postfix decrement, not prefix, in region-test.c 2009-07-08 00:38:28 -04:00
Søren Sandmann Pedersen
4e41905bac Eliminate empty rectangles in pixman_region_init_rects().
Otherwise they show up in the validated regions.
2009-07-08 00:08:49 -04:00
Søren Sandmann Pedersen
967ff0bdc7 Add an initialization with an empty rectangle to region-test.c
This should produce a valid region without empty rectangles in
it. Currently it doesn't.
2009-07-07 22:55:32 -04:00
Søren Sandmann Pedersen
6b8251039a Add test cases to oob-test using PIXMAN_{a,x}2b10g10r10 2009-06-24 20:08:50 -04:00
Søren Sandmann Pedersen
aa6adb646a Delete FbIntMult and FbIntDiv macros, and move FbIntAdd to pixman-combine.h 2009-06-24 12:37:46 -04:00
Søren Sandmann Pedersen
53ada03119 Add a table to oob-test so that it can test more than one setup. 2009-06-24 12:33:26 -04:00
Søren Sandmann Pedersen
fd90429a32 Fix typo in oob-test.c 2009-06-24 11:24:11 -04:00
Søren Sandmann Pedersen
bed9c378ff Add test case for out-of-bounds memory access. 2009-06-24 10:37:07 -04:00
Søren Sandmann Pedersen
905856f43d Add convolution-test.c program 2009-06-23 16:37:35 -04:00
Søren Sandmann Pedersen
79d397003f Delete leftover use of PIXMAN_OP_FLASH_SUBTRACT 2009-06-23 16:23:26 -04:00
Søren Sandmann Pedersen
e3a94e8928 Add screen-test.c test program 2009-06-23 14:42:37 -04:00
Søren Sandmann Pedersen
16873f6d1b Make the composite test window bigger by default.
Also rearrange the squares to better match typical aspect ratios.
2009-06-23 14:42:37 -04:00
Carlos Garcia Campos
cdae71ee85 [TEST] Update composite-test to test more operators 2009-06-23 14:42:36 -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
Søren Sandmann Pedersen
85b390cadf Fix alpha map computation in pixman_compute_composite_region()
According to the RENDER spec, the origin of the alpha map is
interpreted relative to the origin of the drawable of the image, not
the origin of the drawable of the alpha map.

This commit fixes that and adds an alpha-test.c test program.

The only use of alpha maps I have been able to find is in Qt and they
don't use a non-zero alpha origin.
2009-05-21 18:25:57 -04:00
Søren Sandmann Pedersen
ecaaef2f50 Move the gradient walker code to its own file 2009-05-16 15:12:36 -04:00
Søren Sandmann Pedersen
7a9bfa1461 Merge branch 'master' of git+ssh://sandmann@git.freedesktop.org/git/pixman 2009-05-13 13:10:01 -04:00
Søren Sandmann Pedersen
81b94d7258 Add test that shows difference in clipping with transformed vs untransformed 2009-05-13 13:09:45 -04:00
Søren Sandmann Pedersen
8b2e08d494 Get rid of separate combineU and combineC types 2009-05-04 18:55:06 -04:00
Søren Sandmann Pedersen
f98c800fba Mention utils.h in test/Makefile.am so that make dist will pick it up
Pointed out by Julien Cristau.
2009-05-04 18:54:27 -04:00
Søren Sandmann Pedersen
e047f605e2 Move all the GTK+ test code into its own file, utils.c 2009-05-04 18:34:54 -04:00
Søren Sandmann Pedersen
c882260d4b Include string.h and fix warning in trap-test.c 2009-04-28 22:49:31 -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
Søren Sandmann Pedersen
880afeecc0 Add trap-crasher.c test program
Based off of Pavel Kankovsky's test case in bug 16560.
2009-04-24 21:39:33 -04:00
Søren Sandmann Pedersen
47dabe1d02 Fix pixbuf_from_argb32() to take premultiplied alpha into account 2009-04-04 06:04:42 -04:00
Søren Sandmann Pedersen
fb8e9b16d5 Add a new trap-test test program.
Also some tweaks to the build system in the test directory to make it
build non-gtk+-using application when use of gtk+ is disabled.
2009-04-04 06:03:20 -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
Søren Sandmann Pedersen
da18a5675b Extend clip-test to demonstrate a bug in source clipping 2008-09-07 00:13:10 -04:00
Søren Sandmann Pedersen
00f3d6ef22 Fix bug in pixman_image_is_opaque()
Non-repeating gradient images would be reported as opaque. Also add
new test program to test source clipping.
2008-09-06 23:49:25 -04:00
Søren Sandmann
a76826f198 Fix uses of short variables in pixman-region.c 2008-06-09 01:03:15 -04:00
Søren Sandmann
85bad33380 Add infinite loop test 2008-06-09 00:51:28 -04:00
Aaron Plattner
0c3547bad4 Fix test build when srcdir != builddir.
The tests were including pixman.h, but pixman.h couldn't find pixman-version.h
because it was in $(top_builddir)/pixman rather than $(top_srcdir)/pixman.
2008-03-28 12:16:07 -07:00