Commit Graph

1757 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
582fa58bba Don't use __thread on MinGW.
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-03 11:12:24 +03:00
Søren Sandmann Pedersen
95d4026866 Add support for 8bpp to pixman_fill_sse2() 2010-05-03 10:59:36 +03:00
Søren Sandmann Pedersen
d539e0c661 sse2: Add sse2_composite_over_reverse_n_8888
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-03 10:59:36 +03:00
Søren Sandmann Pedersen
2d65fb033b Don't consider indexed formats opaque.
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-03 10:59:36 +03:00
Søren Sandmann Pedersen
19459672ce Add an over_8888_8888_8888 sse2 fast path. 2010-05-03 10:59:36 +03:00
Søren Sandmann Pedersen
a3d29157b4 Add pixman_region{,32}_intersect_rect() 2010-05-03 10:59:36 +03:00
Søren Sandmann Pedersen
c0d0d20bd2 Rename fast_composite_src_8888_x888 to fast_composite_src_memcpy()
Then generalize it and use it for SRC copying between various
identical formats.
2010-05-03 10:59:36 +03:00
Jeff Muizelaar
1f0cba3bdc Add missing HAVE_CONFIG_H guards for config.h inclusion 2010-04-27 15:23:20 -04:00
Søren Sandmann Pedersen
526132fa65 Remove alphamap from the GTK+ part of tests/Makefile.am
It doesn't use GTK+ and it was already listed in the non-GTK+ part.
2010-04-22 12:14:23 -04:00
Søren Sandmann Pedersen
8f7cc5e438 Add pixman_image_get_format() accessor 2010-04-21 09:59:29 -04:00
Søren Sandmann Pedersen
2b1cae1ef6 Some minor updates to README 2010-04-21 09:55:35 -04:00
Søren Sandmann Pedersen
15f5868f63 Update README to mention the pixman mailing list 2010-04-18 16:24:39 -04:00
Søren Sandmann Pedersen
a652d5c154 [mmx] Fix mask creation bugs
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-13 22:41:48 -04:00
Søren Sandmann Pedersen
714559dccd Fixes for pthread thread local storage.
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-13 22:41:48 -04:00
Søren Sandmann Pedersen
634ba33b5b Fix uninitialized cache when pthreads are used
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-13 22:41:47 -04:00
Siddharth Agarwal
bc11545a1b Visual Studio 2010 includes stdint.h
Use the builtin version instead of defining the types ourselves.
2010-04-13 10:15:29 -04:00
Søren Sandmann Pedersen
0345c343e5 Post-release version bump to 0.19.1 2010-04-01 06:21:21 -04:00
Søren Sandmann Pedersen
e9dc568d6f Pre-release version bump to 0.18.0 2010-04-01 05:23:31 -04:00
Matthias Hopf
efd41c6287 Revert "Improve PIXREGION_NIL to return true on degenerated regions."
This reverts commit ebba149313.
Scheduled for re-discussion after stable 0.18 has been released.
2010-03-24 18:54:29 +01:00
Matthias Hopf
ebba149313 Improve PIXREGION_NIL to return true on degenerated regions.
Fixes Novell bug 568811.
2010-03-24 14:51:05 +01:00
Søren Sandmann Pedersen
c0f8d417b5 Post-release version bump to 0.17.15 2010-03-23 17:25:54 -04:00
Søren Sandmann Pedersen
b35f0b0158 Pre-release version bump to 0.17.14 2010-03-23 16:52:02 -04:00
Søren Sandmann Pedersen
27a9f0468b Merge remote branch 'ssvb/arm-fixes' 2010-03-23 11:00:04 -04:00
Siarhei Siamashka
3ef203331f ARM: SIMD optimizations moved to a separate .S file
This should be the last step in providing full armv4t compatibility
with CPU features runtime autodetection in pixman.
2010-03-22 21:56:17 +02:00
Siarhei Siamashka
0a0591c2f7 ARM: SIMD optimizations updated to use common assembly calling conventions 2010-03-22 20:17:14 +02:00
Siarhei Siamashka
c1e8d4533a ARM: Helper ARM NEON assembly binding macros moved into a separate header
This is needed for future reuse of the same macros for the other
ARM assembly optimizations (armv4t, armv6)
2010-03-22 18:51:54 +02:00
Siarhei Siamashka
5791026e45 ARM: Workaround for a NEON bug in assembler from binutils 2.18
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-22 16:15:18 +02:00
Siarhei Siamashka
68d8d83223 ARM: Use '.object_arch' directive in NEON assembly file
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-22 12:12:03 +02:00
Jon TURNEY
69f1ec9a78 Avoid a potential division-by-zero exeception in window-test
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-17 20:25:25 -04:00
Søren Sandmann Pedersen
50713d9d0d Post-release version bump to 0.17.13 2010-03-17 15:12:06 -04:00
Søren Sandmann Pedersen
fb68d6c14d Pre-release version bump to 0.17.12 2010-03-17 13:46:44 -04:00
Søren Sandmann Pedersen
265ea1fb4d Specialize the fast_composite_scaled_nearest_* scalers to positive x units
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-17 11:14:20 -04:00
Søren Sandmann Pedersen
9cd1051523 Add a FAST_PATH_X_UNIT_POSITIVE flag
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.
2010-03-17 11:03:05 -04:00
Alexander Larsson
a5b51bb03c Use the right format for the OVER_8888_565 fast path 2010-03-17 11:03:05 -04:00
Alexander Larsson
3b92b711d0 Add specialized fast nearest scalers
This is a macroized version of SRC/OVER repeat normal/unneeded nearest
neighbour scaling instantiated for some common 8888 and 565 formats.

Based on work by Siarhei Siamashka
2010-03-17 11:03:05 -04:00
Alexander Larsson
5750408e48 Add FAST_PATH_SAMPLES_COVER_CLIP and FAST_PATH_16BIT_SAFE
FAST_PATH_SAMPLES_COVER_CLIP:

This is set of the source sample grid, unrepeated but transformed
completely completely covers the clip destination. If this is set
you can use a simple scaled that doesn't have to care about the repeat
mode.

FAST_PATH_16BIT_SAFE:

This signifies two things:
1) The size of the src/mask fits in a 16.16 fixed point, so something like:

    max_vx = src_image->bits.width << 16;

    Is allowed and is guaranteed to not overflow max_vx

2) When stepping the source space we're guaranteed to never overflow
   a 16.16 bit fix point variable, even if we step one extra step
   in the destination space. This means that a loop doing:

   x = vx >> 16;
   vx += unit_x;								   d = src_row[x];

   will never overflow vx causing x to be negative.

   And additionally, if you track vx like above and apply NORMAL repeat
   after the vx addition with something like:

   while (vx >= max_vx) vx -= max_vx;

   This will never overflow the vx even on the final increment that
   takes vx one past the end of where we will read, which makes the
   repeat loop safe.
2010-03-17 11:03:05 -04:00
Alexander Larsson
cba6fbbddc Add FAST_PATH_NO_NONE_REPEAT flag 2010-03-17 11:03:05 -04:00
Alexander Larsson
7ec023ede1 Add CONVERT_8888_TO_8888 and CONVERT_0565_TO_0565 macros
These are useful for macroization
2010-03-17 11:03:05 -04:00
Alexander Larsson
c903d03052 Add CONVERT_0565_TO_8888 macro
This lets us simplify some fast paths since we get a consistent
naming that always has 8888 and gets some value for alpha.
2010-03-17 11:03:05 -04:00
Søren Sandmann Pedersen
de27f45ddd Ensure that only the low 4 bit of 4 bit pixels are stored.
In some cases we end up trying to use the STORE_4 macro with an 8 bit
values, which resulted in other pixels getting overwritten. Fix this
by always masking off the low 4 bits.

This fixes blitters-test on big-endian machines.
2010-03-17 11:02:58 -04:00
Søren Sandmann Pedersen
6532f8488a Fix contact address in configure.ac 2010-03-16 14:58:18 -04:00
Søren Sandmann Pedersen
7c9f121efe Add PIXMAN_DEFINE_THREAD_LOCAL() and PIXMAN_GET_THREAD_LOCAL() macros
These macros hide the various types of thread local support. On Linux
and Unix, they expand to just __thread. On Microsoft Visual C++, they
expand to __declspec(thread).

On OS X and other systems that don't have __thread, they expand to a
complicated concoction that uses pthread_once() and
pthread_get/set_specific() to get thread local variables.
2010-03-16 14:58:12 -04:00
Søren Sandmann Pedersen
6b9c548200 Add checks for various types of thread local storage.
OS X does not support __thread, so we have to check for it before
using it.  It does however support pthread_get/setspecific(), so if we
don't have __thread, check if those are available.
2010-03-16 12:01:51 -04:00
Alan Coopersmith
313353f1fb Add Sun cc to thread-local support checks in pixman-compiler.h
Clears '#warning: "unknown compiler"' messages when building

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-03-15 15:20:23 -07:00
Alan Coopersmith
b67f784a5d Make .s target asm flag selection more portable
The previous code worked in GNU make, but caused a syntax error in Solaris
make ( https://bugs.freedesktop.org/show_bug.cgi?id=27062 ) - this seems to
work in both, and should hopefully not cause syntax errors in any versions
of make not supporting the macro-substitution-in-macro-name feature, just
cause the macro to expand to nothing.

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
2010-03-15 10:52:20 -07:00
Søren Sandmann Pedersen
7a5dc74785 Fix typo: WORDS_BIG_ENDIAN => WORDS_BIGENDIAN in pixman-edge.c
Pointed out by Andreas Falkenhahn on the cairo mailing list.
2010-03-15 07:40:46 -04:00
Søren Sandmann Pedersen
ff30a5cbb9 test: Add support for indexed formats to blitters-test
These formats work fine, they just need to have a palette set.
2010-03-14 12:25:17 -04:00
Søren Sandmann Pedersen
2b5f7be6c0 pixman.h: Only define stdint types when PIXMAN_DONT_DEFINE_STDINT is undefined
In SPICE, with Microsoft Visual C++, pixman.h is included after
another file that defines these types, which causes warnings and
errors.

This patch allows such code to just define PIXMAN_DONT_DEFINE_STDINT
to use its own version of those types.
2010-03-14 12:24:50 -04:00
Søren Sandmann Pedersen
f4da05c9f9 Merge branch 'operator-table' 2010-03-14 12:12:05 -04:00
Søren Sandmann Pedersen
a12d868df8 Merge branch 'fast-path-cache' 2010-03-14 12:12:00 -04:00