summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-06-24Store the conical angle in floating point radians, not fixed point degreesHEADmasterSøren Sandmann Pedersen2-5/+7
This is a slight simplification.
2010-06-20Fix conical gradients to match QConicalGradient from QtSøren Sandmann Pedersen1-19/+32
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-18Make separate gray scanline storers.Søren Sandmann Pedersen2-4/+38
For gray formats the palettes are indexed by luminance, not RGB, so we can't use the color storers for gray too.
2010-06-18When storing a g1 pixel, store the lowest bit, rather than comparing with 0.Søren Sandmann Pedersen2-2/+2
2010-06-09test: verify that gradients do not crash pixmanAndrea Canciani2-0/+119
Test gradients under particular conditions (no stops, all the stops at the same offset) to check that pixman does not misbehave.
2010-06-09support single-stop gradientsAndrea Canciani2-4/+0
Just like conical gradients, linear and radial gradients can now have a single stop.
2010-06-09Eliminate mask_bits from all the scanline fetchers.Søren Sandmann Pedersen9-144/+85
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-03create getter for component alphaJeff Muizelaar2-0/+7
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-05-13test: added OpenMP support for better utilization of multiple CPU coresSiarhei Siamashka4-0/+10
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-13test: scaling-test updated to use new fuzzer_test_main() functionSiarhei Siamashka2-99/+11
2010-05-13test: blitters-test updated to use new fuzzer_test_main() functionSiarhei Siamashka2-118/+9
2010-05-13test: blitters-test-bisect.rb converted to perlSiarhei Siamashka1-0/+68
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-13test: main loop from blitters-test added as a new function to utils.cSiarhei Siamashka2-0/+118
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-09Merge branch 'for-master'Søren Sandmann Pedersen2-0/+68
2010-05-06test/gtk-utils: Set the size of the window to the size of the imageSøren Sandmann Pedersen1-0/+2
2010-05-04Add support for compiling pixman without thread/tls supportJeff Muizelaar1-2/+9
2010-05-03Add macros for thread local storage on MinGW 32Søren Sandmann Pedersen1-0/+65
These macros are identical to the ones that Tor Lillqvist posted here: http://lists.freedesktop.org/archives/pixman/2010-April/000160.html with one exception: the variable is allocated with calloc() and not malloc(). Cc: tml@iki.fi
2010-05-03Don't use __thread on MinGW.Søren Sandmann Pedersen1-0/+3
It is apparently broken. See this: http://mingw-users.1079350.n2.nabble.com/gcc-4-4-multi-threaded-exception-handling-thread-specifier-not-working-td3440749.html We'll need to support thread local storage on MinGW32 some other way. Cc: tml@iki.fi
2010-05-03Add support for 8bpp to pixman_fill_sse2()Søren Sandmann Pedersen1-5/+34
2010-05-03sse2: Add sse2_composite_over_reverse_n_8888Søren Sandmann Pedersen1-0/+104
This is a small speed-up for the poppler benchmark: Before: [ # ] backend test min(s) median(s) stddev. count [ 0] image poppler 4.443 4.474 0.31% 6/6 After: [ # ] backend test min(s) median(s) stddev. count [ 0] image poppler 4.224 4.248 0.42% 6/6
2010-05-03Don't consider indexed formats opaque.Søren Sandmann Pedersen2-3/+5
The indexed formats have 0 bits of alpha, but can't be considered opaque because there may be non-opaque colors in the palette.
2010-05-03Add an over_8888_8888_8888 sse2 fast path.Søren Sandmann Pedersen1-0/+168
2010-05-03Add pixman_region{,32}_intersect_rect()Søren Sandmann Pedersen2-1/+30
2010-05-03Rename fast_composite_src_8888_x888 to fast_composite_src_memcpy()Søren Sandmann Pedersen1-22/+38
Then generalize it and use it for SRC copying between various identical formats.
2010-04-27Add missing HAVE_CONFIG_H guards for config.h inclusionJeff Muizelaar1-0/+4
2010-04-22Remove alphamap from the GTK+ part of tests/Makefile.amSøren Sandmann Pedersen1-2/+1
It doesn't use GTK+ and it was already listed in the non-GTK+ part.
2010-04-21Add pixman_image_get_format() accessorSøren Sandmann Pedersen2-0/+10
2010-04-21Some minor updates to READMESøren Sandmann Pedersen1-5/+4
2010-04-18Update README to mention the pixman mailing listSøren Sandmann Pedersen1-8/+4
2010-04-13[mmx] Fix mask creation bugsSøren Sandmann Pedersen1-0/+2
This line: mask = mask | mask >> 8 | mask >> 16 | mask >> 24; only works when mask has 0s in the lower 24 bits, so add mask &= 0xff000000; before. Reported by Todd Rinaldo on the #cairo IRC channel.
2010-04-13Fixes for pthread thread local storage.Søren Sandmann Pedersen1-5/+5
The tls_name_key variable is passed to tls_name_get(), and the first time this happens it isn't initialized. tls_name_get() then passes it on to tls_name_alloc() which passes it on to pthread_setspecific() leading to undefined behavior. None of this is actually necessary at all because there is only one such variable per thread local variable, so it doesn't need to passed as a parameter at all. All of this was pointed out by Tor Lillqvist on the cairo mailing list.
2010-04-13Fix uninitialized cache when pthreads are usedSøren Sandmann Pedersen1-1/+1
The thread local cache is allocated with malloc(), but we rely on it being initialized to zero, so allocate it with calloc() instead.
2010-04-13Visual Studio 2010 includes stdint.hSiddharth Agarwal1-1/+2
Use the builtin version instead of defining the types ourselves.
2010-04-01Post-release version bump to 0.19.1Søren Sandmann Pedersen1-2/+2
2010-04-01Pre-release version bump to 0.18.0pixman-0.18.0Søren Sandmann Pedersen1-2/+2
2010-03-24Revert "Improve PIXREGION_NIL to return true on degenerated regions."Matthias Hopf1-5/+1
This reverts commit ebba1493136a5a0dd7667073165b2115de203eda. Scheduled for re-discussion after stable 0.18 has been released.
2010-03-24Improve PIXREGION_NIL to return true on degenerated regions.Matthias Hopf1-1/+5
Fixes Novell bug 568811.
2010-03-23Post-release version bump to 0.17.15Søren Sandmann Pedersen1-1/+1
2010-03-23Pre-release version bump to 0.17.14pixman-0.17.14Søren Sandmann Pedersen1-1/+1
2010-03-23Merge remote branch 'ssvb/arm-fixes'Søren Sandmann Pedersen7-388/+769
2010-03-22ARM: SIMD optimizations moved to a separate .S fileSiarhei Siamashka4-32/+359
This should be the last step in providing full armv4t compatibility with CPU features runtime autodetection in pixman.
2010-03-22ARM: SIMD optimizations updated to use common assembly calling conventionsSiarhei Siamashka1-102/+67
2010-03-22ARM: Helper ARM NEON assembly binding macros moved into a separate headerSiarhei Siamashka2-248/+329
This is needed for future reuse of the same macros for the other ARM assembly optimizations (armv4t, armv6)
2010-03-22ARM: Workaround for a NEON bug in assembler from binutils 2.18Siarhei Siamashka1-6/+6
The problem was reported as bug 25534 against pixman in freedesktop.org bugzila. Link to a patch for binutils: http://sourceware.org/ml/binutils/2008-03/msg00260.html For pixman the impact is a build failure when using binutils 2.18. Versions 2.19 and higer are fine. Still some distros may be using older versions of binutils and this is causing problems. This patch workarounds the problem by replacing a problematic "vmov a, b" instruction with equivalent "vorr a, b, b". Actually they even map to the same instruction opcode in the generated code, so the resulting binary is identical with and without patch.
2010-03-22ARM: Use '.object_arch' directive in NEON assembly fileSiarhei Siamashka2-1/+9
This can be used to override the architecture recorded in the EABI object attribute section. We set a minimum arch to 'armv4'. Binutils documentation recommends to use this directive with the code performing runtime detection of CPU features. Additionally NEON/VFP EABI attributes are suppressed. And the instruction set to use is explicitly set to '.arm'. Configure test for NEON support is also updated to include a bunch of these new directives (if any of these is unsupported by the assembler, it is better to fail configure test than to fail library build). All these changes are required to fix SIGILL problem on armv4t, reported in http://lists.freedesktop.org/archives/pixman/2010-March/000123.html
2010-03-17Avoid a potential division-by-zero exeception in window-testJon TURNEY1-2/+2
Avoid a division-by-zero exception if the first number returned by rand() is a multiple of 500, causing us to create a zero width pixmap, and then attempt to use get_rand(0) when generating a random stride... Fixes https://bugs.freedesktop.org/attachment.cgi?id=34162
2010-03-17Post-release version bump to 0.17.13Søren Sandmann Pedersen1-1/+1
2010-03-17Pre-release version bump to 0.17.12pixman-0.17.12Søren Sandmann Pedersen1-1/+1
2010-03-17Specialize the fast_composite_scaled_nearest_* scalers to positive x unitsSøren Sandmann Pedersen1-4/+16
This avoids a test in the inner loop, which improves performance especially for tiled sources. On x86-32, I get these results: Before: op=1, src_fmt=20028888, dst_fmt=20028888, speed=306.96 MPix/s (73.18 FPS) op=1, src_fmt=20028888, dst_fmt=10020565, speed=102.67 MPix/s (24.48 FPS) op=1, src_fmt=10020565, dst_fmt=10020565, speed=324.85 MPix/s (77.45 FPS) After: op=1, src_fmt=20028888, dst_fmt=20028888, speed=332.19 MPix/s (79.20 FPS) op=1, src_fmt=20028888, dst_fmt=10020565, speed=110.41 MPix/s (26.32 FPS) op=1, src_fmt=10020565, dst_fmt=10020565, speed=363.28 MPix/s (86.61 FPS)
2010-03-17Add a FAST_PATH_X_UNIT_POSITIVE flagSøren Sandmann Pedersen2-7/+14
This is the common case for a lot of transformed images. If the unit were negative, the transformation would be a reflection which is fairly rare.