Commit Graph

1929 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
5b289d39cf Extend scaling-crash-test in various ways
This extends scaling-crash-test to test some more things:

- All combinations of NEAREST/BILINEAR/CONVOLUTION filters and
  NORMAL/PAD/REFLECT repeat modes.

- Tests various scale factors very close to 1/7th such that the source
  area is very close to edge of the source image.

- The same things, only with scale factors very close to 1/32767th.

- Enables the commented-out tests for accessing memory outside the
  source buffer.

Also there is now a border around the source buffer which has a
different color than the source buffer itself so that if we sample
outside, it will show up.

Finally, the test now allows the destination buffer to not be changed
at all. This allows pixman to simply bail out in cases where the
transformation too strange.
2010-08-08 13:57:39 -04:00
Søren Sandmann Pedersen
71ff55a3e5 Fix Altivec/OpenBSD patch
As Brad pointed out, I pushed the wrong version of this patch.
2010-08-05 19:00:56 -04:00
Brad Smith
cb50e9cc95 Add support for AltiVec detection for OpenBSD/PowerPC.
Bug 29331.
2010-08-05 12:16:40 -04:00
Søren Sandmann Pedersen
664132128e CODING_STYLE: Delete the stuff about trailing spaces
Also fix various other minor issues.
2010-08-04 09:50:30 -04:00
Søren Sandmann Pedersen
cc9221ce96 If we bail out of do_composite, make sure to undo any workarounds.
The workaround for an old X bug has to be undone if we bail from
do_composite, so we can't just return.
2010-08-04 09:12:05 -04:00
Søren Sandmann Pedersen
b243a66041 Add x14r6g6b6 format to blitters-test 2010-08-04 08:58:51 -04:00
Marek Vasut
d6a7b15424 Add support for 32bpp X14R6G6B6 format.
This format is used on PXA framebuffer with some boards. It uses only 18 bits
from the 32 bit framebuffer to interpret color.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2010-08-04 08:44:24 -04:00
Siarhei Siamashka
226a6df4f9 test: 'scaling-test' updated to provide better coverage
Negative scale factors are now also tested. A small additional
translate transform helps to stress the use of fractional
coordinates better.

Also the number of iterations to run by default increased in order
to compensate increased variety of operations to be tested.
2010-07-27 16:07:34 +03:00
Siarhei Siamashka
af3eeaeb13 test: 'scaling-crash-test' added
This test tries to exploit some corner cases and previously known
bugs in nearest neighbor scaling fast path code, attempting to
crash pixman or cause some other nasty effect.
2010-07-27 16:07:07 +03:00
Søren Sandmann Pedersen
90483fcabb bits: Fix potential divide-by-zero in projective code
If the homogeneous coordinate is 0, just set the coordinates to 0.
2010-07-23 19:16:43 -04:00
Søren Sandmann Pedersen
bf125fbbb7 [sse2] Add sse2_composite_add_n_8()
This shows up when epiphany displays the "ImageTest" on
glimr.rubyforge.org/cake/canvas.html
2010-07-22 07:39:49 -04:00
Søren Sandmann Pedersen
16ae3285e6 [sse2] Add sse2_composite_in_n_8()
This shows up when epiphany displays the "ImageTest" on
glimr.rubyforge.org/cake/canvas.html
2010-07-22 07:39:49 -04:00
Søren Sandmann Pedersen
e0b430a13e [sse2] Add sse2_composite_src_x888_8888()
This operation shows up when Firefox displays
http://dougx.net/plunder/plunder.html
2010-07-22 07:39:49 -04:00
Søren Sandmann Pedersen
16bae83475 [fast] Add fast_composite_src_x888_8888()
This shows up on when Firefox displays http://dougx.net/plunder/plunder.html
2010-07-22 07:39:49 -04:00
M Joonas Pihlaja
9399b1a5af Fix thinko in configure.ac's macro to test linking.
Copy-paste carnage.  Renames save_{cflags,libs,ldflags} to
save_{CFLAGS,LIBS,LDFLAGS}.
2010-07-21 23:52:23 +03:00
M Joonas Pihlaja
5537e51cd0 Avoid trailing slashes on automake install dirs.
The install-sh on a Solaris box couldn't copy with
trailing slashes.
2010-07-21 23:52:23 +03:00
M Joonas Pihlaja
1d9c6fa623 Check for specific flags by actually trying to compile and link.
Instead of relying on preprocessor version checks to see if a
some compiler flags are supported, actually try to compile and
link a test program with the flags.
2010-07-21 23:52:23 +03:00
M Joonas Pihlaja
d95ae70604 Check that the OpenMP pragmas don't cause link errors.
This patch adds extra guards around our use of
OpenMP pragmas and checks that the pragmas won't
cause link errors.  This fixes the build on
Tru64 and Solaris with the native compilers and clang.
2010-07-21 23:52:23 +03:00
M Joonas Pihlaja
eb247ac377 Don't trust OpenBSD's gcc to produce working code for __thread.
The gcc on OpenBSD 4.5 to 4.7 at least produces bad code for __thread,
without as much as a warning.

See PR #6410 "Using __thread TLS variables compiles ok but segfault at runtime."

http://cvs.openbsd.org/cgi-bin/query-pr-wrapper?full=yes&numbers=6410
2010-07-21 23:52:22 +03:00
M Joonas Pihlaja
dbf35f1f27 Try harder to find suitable flags for pthreads.
The flags -D_REENTRANT -lpthread work on more systems than
does -pthread unfortunately, so give that a go too.
2010-07-21 23:52:22 +03:00
Søren Sandmann Pedersen
9897bb4eee Check for read accessors before taking the bilinear fast path
The bilinear fast path accesses pixels directly, so if the image has a
read accessor, then it can't be used.
2010-07-13 15:46:21 -04:00
Søren Sandmann Pedersen
ce3d9fca73 fast-path: Some formatting fixes
Add spaces before parentheses; fix indentation in the macro.
2010-07-12 09:46:37 -04:00
Søren Sandmann Pedersen
839326e471 In the FAST_NEAREST macro call the function 8888_8888 and not x888_x888
The x888 suggests that they have something to do with the x8r8g8b8
formats, but that's not the case; they are assuming a8r8g8b8
formats. (Although in some cases they also work for x8r8g8b8 type
formats).
2010-07-12 09:46:37 -04:00
Søren Sandmann Pedersen
e13d9f9684 Make the repeat mode explicit in the FAST_NEAREST macro.
Before, it was 0 or 1 meaning 'no repeat' and 'normal repeat'
respectively. Now we explicitly pass in either NONE or NORMAL.
2010-07-12 09:46:37 -04:00
Søren Sandmann Pedersen
2e7fb66553 When converting indexed formats to 64 bits, don't correct for channel widths
Indexed formats are mapped to a8r8g8b8 with full precision, so when
expanding we shouldn't correct for the width of the channels
2010-07-11 09:43:56 -04:00
Søren Sandmann Pedersen
2df6dac0be test: Make sure the palettes for indexed format roundtrip properly
The palettes for indexed formats must satisfy the condition that if
some index maps to a color C, then the 15 bit version of that color
must map back to the index. This ensures that the destination operator
is always a no-op, which seems like a reasonable assumption to make.
2010-07-11 09:43:56 -04:00
Søren Sandmann Pedersen
5dd59c8b7c Split the fast path caching into its own force_inline function
The do_composite() function is a lot more readable this way.
2010-07-11 09:43:56 -04:00
Søren Sandmann Pedersen
98d19d9abd Cache the implementation along with the fast paths.
When calling a fast path, we need to pass the corresponding
implementation since it might contain information necessary to run the
fast path.
2010-07-11 09:43:55 -04:00
Søren Sandmann Pedersen
f18bcf1f6e Hide the global implementation variable behind a force_inline function.
Previously the global variable was called 'imp' which was confusing
with the argument to various other functions also being called imp.
2010-07-11 09:43:55 -04:00
Søren Sandmann Pedersen
5c935473d8 Fix memory leak in the pthreads thread local storage code
When a thread exits, we leak whatever is stored in thread local
variables, so install a destructor to free it.
2010-07-10 21:05:27 -04:00
Søren Sandmann Pedersen
7114b2d63b Make the combiner macros less likely to cause name collisions.
Protect the arguments to the combiner macros with parentheses, and
postfix their temporary variables with underscores to avoid name space
collisions with the surrounding code.

Alexander Shulgin pointed out that underscore-prefixed identifiers are
reserved for the C implementation, so we use postfix underscores
instead.
2010-07-07 06:50:45 -04:00
Søren Sandmann Pedersen
a92e4a6a94 Minor tweaks to README 2010-07-06 19:15:29 -04:00
Søren Sandmann Pedersen
ca846806cb Store the conical angle in floating point radians, not fixed point degrees
This is a slight simplification.
2010-06-24 14:56:09 -04:00
Søren Sandmann Pedersen
3074d57b56 Fix conical gradients to match QConicalGradient from Qt
Under the assumption that pixman gradients are supposed to match
QConicalgradient, described here:

        http://doc.trolltech.com/4.4/qconicalgradient.html

this patch fixes two separate bugs in pixman-conical-gradient.c.

The first bug is that the output of atan2() is in the range of [-pi,
pi], which means the parameter into the gradient can be negative. This
is wrong since a QConicalGradient always interpolates around the
center from 0 to 1. The fix for that is to (a) make sure the given
angle is between 0 and 360, and (b) add or subtract 2 * M_PI if the
computed angle ends up outside [0, 2 * pi].

The other bug is that we were interpolating clockwise, whereas
QConicalGradient calls for a counter-clockwise interpolation. This is
easily fixed by subtracting the parameter from 1.

Finally, this patch encapsulates the computation in a new force-inline
function so that it can be reused in both the affine and non-affine
case.
2010-06-20 04:45:20 -04:00
Søren Sandmann Pedersen
66365b5ef1 Make separate gray scanline storers.
For gray formats the palettes are indexed by luminance, not RGB, so we
can't use the color storers for gray too.
2010-06-18 20:33:02 -04:00
Søren Sandmann Pedersen
4e1d4847c9 When storing a g1 pixel, store the lowest bit, rather than comparing with 0. 2010-06-18 20:33:02 -04:00
Andrea Canciani
445eb6385f test: verify that gradients do not crash pixman
Test gradients under particular conditions (no stops, all the stops
at the same offset) to check that pixman does not misbehave.
2010-06-09 17:30:41 +02:00
Andrea Canciani
de03202581 support single-stop gradients
Just like conical gradients, linear and radial gradients can now
have a single stop.
2010-06-09 17:30:41 +02:00
Søren Sandmann Pedersen
32bd31d677 Eliminate mask_bits from all the scanline fetchers.
Back in the day, the mask_bits argument was used to distinguish
between masks used for component alpha (where it was 0xffffffff) and
masks for unified alpha (where it was 0xff000000). In this way, the
fetchers could check if just the alpha channel was 0 and in that case
avoid fetching the source.

However, we haven't actually used it like that for a long time; it is
currently always either 0xffffffff or 0 (if the mask is NULL). It also
doesn't seem worthwhile resurrecting it because for premultiplied
buffers, if alpha is 0, then so are the color channels
normally.

This patch eliminates the mask_bits and changes the fetchers to just
assume it is 0xffffffff if mask is non-NULL.
2010-06-09 07:17:59 -04:00
Jeff Muizelaar
78778e5963 create getter for component alpha
This patch comes from the mozilla central tree. See
http://hg.mozilla.org/mozilla-central/rev/89338a224278 for the
original changeset.

Signed-off-by: Jeff Muizelaar <jmuizelaar@mozilla.com>
Signed-off-by: Egor Starkov <egor.starkov@nokia.com>
Signed-off-by: Rami Ylimaki <ext-rami.ylimaki@nokia.com>
Signed-off-by: Siarhei Siamashka <siarhei.siamashka@nokia.com>
2010-06-03 23:18:16 +03:00
Robert Hooker
8814afc5fd Prepare changelog for upload 2010-05-14 13:06:08 -04:00
Robert Hooker
1773c6829c Bump changelogs. 2010-05-14 12:57:58 -04:00
Robert Hooker
c42434196b Merge branch 'upstream-experimental' into debian-experimental 2010-05-14 12:31:03 -04:00
Siarhei Siamashka
cfc4e38852 test: added OpenMP support for better utilization of multiple CPU cores
Some of the tests are quite heavy CPU users and may benefit from
using multiple CPU cores, so the programs from 'test' directory
are now built with OpenMP support. OpenMP is easy to use, portable
and also takes care of making a decision about how many threads
to spawn.
2010-05-13 21:04:55 +03:00
Siarhei Siamashka
f905ebb03d test: scaling-test updated to use new fuzzer_test_main() function 2010-05-13 21:04:36 +03:00
Siarhei Siamashka
be387701a5 test: blitters-test updated to use new fuzzer_test_main() function 2010-05-13 21:04:31 +03:00
Siarhei Siamashka
9ed9abd154 test: blitters-test-bisect.rb converted to perl
This new script can be used to run continuously to compare two test
programs based on fuzzer_test_main() function from 'util.c' and
narrow down to a single problematic test from the batch which results
in different behavior.
2010-05-13 21:03:07 +03:00
Siarhei Siamashka
30c3e91c3f test: main loop from blitters-test added as a new function to utils.c
This new generalized function can be reused in both blitters-test
and scaling-test. Final checksum calculation changed in order to make
it parallelizable (it is a sum of individual 32-bit values returned
by a callback function, which is now responsible for running test-specific
code). Return values may be crc32, some other hash or even just zero on
success and non-zero on error (in this case, the expected result of the
whole test run should be 0).
2010-05-13 21:02:27 +03:00
Søren Sandmann Pedersen
872c915dcb Post-release version bump to 0.18.3 2010-05-12 16:33:35 -04:00
Søren Sandmann Pedersen
b48d8b5201 Pre-release version bump to 0.18.2 2010-05-12 16:27:02 -04:00