Matt Turner [Thu, 19 Apr 2012 21:33:27 +0000 (17:33 -0400)]
mmx: add src_8888_0565
Uses the pmadd technique described in
http://software.intel.com/sites/landingpage/legacy/mmx/MMX_App_24-16_Bit_Conversion.pdf
The technique uses the packssdw instruction which uses signed
saturatation. This works in their example because they pack 888 to 555
leaving the high bit as zero. For packing to 565, it is unsuitable, so
we replace it with an or+shuffle.
Loongson:
src_8888_0565 = L1: 106.13 L2: 83.57 M: 33.46 ( 68.90%) HT: 30.29 VT: 27.67 R: 26.11 RT: 15.06 ( 135Kops/s)
src_8888_0565 = L1: 122.10 L2: 117.53 M: 37.97 ( 78.58%) HT: 33.14 VT: 30.09 R: 29.01 RT: 15.76 ( 139Kops/s)
ARM/iwMMXt:
src_8888_0565 = L1: 67.88 L2: 56.61 M: 31.20 ( 56.74%) HT: 29.22 VT: 27.01 R: 25.39 RT: 19.29 ( 130Kops/s)
src_8888_0565 = L1: 110.38 L2: 82.33 M: 40.92 ( 73.22%) HT: 35.63 VT: 32.22 R: 30.07 RT: 18.40 ( 132Kops/s)
Matt Turner [Wed, 18 Apr 2012 20:24:28 +0000 (16:24 -0400)]
mmx: add x8f8g8b8 fetcher
Loongson:
add_x888_x888 = L1: 29.36 L2: 27.81 M: 14.05 ( 38.74%) HT: 12.45 VT: 11.78 R: 11.52 RT: 7.23 ( 75Kops/s)
add_x888_x888 = L1: 36.06 L2: 34.55 M: 14.81 ( 41.03%) HT: 14.01 VT: 13.41 R: 13.06 RT: 9.06 ( 90Kops/s)
src_x888_8_x888 = L1: 21.92 L2: 20.15 M: 13.35 ( 41.42%) HT: 11.70 VT: 10.95 R: 10.53 RT: 6.18 ( 65Kops/s)
src_x888_8_x888 = L1: 25.43 L2: 23.51 M: 14.12 ( 44.00%) HT: 13.14 VT: 12.50 R: 11.86 RT: 7.49 ( 76Kops/s)
over_x888_8_0565 = L1: 10.64 L2: 10.17 M: 7.74 ( 21.35%) HT: 6.83 VT: 6.55 R: 6.34 RT: 4.03 ( 46Kops/s)
over_x888_8_0565 = L1: 11.41 L2: 10.97 M: 8.07 ( 22.36%) HT: 7.42 VT: 7.18 R: 6.92 RT: 4.62 ( 52Kops/s)
ARM/iwMMXt:
add_x888_x888 = L1: 22.10 L2: 18.93 M: 13.48 ( 32.29%) HT: 11.32 VT: 10.64 R: 10.36 RT: 6.51 ( 61Kops/s)
add_x888_x888 = L1: 24.26 L2: 20.83 M: 14.52 ( 35.64%) HT: 12.66 VT: 12.98 R: 11.34 RT: 7.69 ( 72Kops/s)
src_x888_8_x888 = L1: 19.33 L2: 17.66 M: 14.26 ( 38.43%) HT: 11.53 VT: 10.83 R: 10.57 RT: 6.12 ( 58Kops/s)
src_x888_8_x888 = L1: 21.23 L2: 19.60 M: 15.41 ( 42.55%) HT: 12.66 VT: 13.30 R: 11.55 RT: 7.32 ( 67Kops/s)
over_x888_8_0565 = L1: 8.15 L2: 7.56 M: 6.50 ( 15.58%) HT: 5.73 VT: 5.49 R: 5.50 RT: 3.53 ( 38Kops/s)
over_x888_8_0565 = L1: 8.35 L2: 7.85 M: 6.68 ( 16.40%) HT: 6.12 VT: 5.97 R: 5.78 RT: 4.03 ( 43Kops/s)
Matt Turner [Wed, 18 Apr 2012 20:14:08 +0000 (16:14 -0400)]
mmx: add a8 fetcher
oprofile of xfce4-terminal-a1
210535 9.0407 libpixman-1.so.0.25.3 fetch_scanline_a8
144802 6.0054 libpixman-1.so.0.25.3 mmx_fetch_a8
Loongson:
add_8_8_8 = L1: 17.98 L2: 17.28 M: 14.28 ( 19.79%) HT: 11.11 VT: 10.38 R: 9.97 RT: 5.14 ( 55Kops/s)
add_8_8_8 = L1: 20.44 L2: 19.65 M: 15.62 ( 21.53%) HT: 12.86 VT: 11.98 R: 11.32 RT: 6.13 ( 64Kops/s)
src_8888_8_0565 = L1: 19.97 L2: 18.59 M: 13.42 ( 32.55%) HT: 11.46 VT: 10.78 R: 10.33 RT: 5.87 ( 61Kops/s)
src_8888_8_0565 = L1: 21.16 L2: 19.68 M: 13.94 ( 33.64%) HT: 12.31 VT: 11.52 R: 11.02 RT: 6.54 ( 68Kops/s)
src_x888_8_x888 = L1: 20.54 L2: 18.88 M: 13.07 ( 40.74%) HT: 11.05 VT: 10.36 R: 10.02 RT: 5.68 ( 60Kops/s)
src_x888_8_x888 = L1: 21.92 L2: 20.15 M: 13.35 ( 41.42%) HT: 11.70 VT: 10.95 R: 10.53 RT: 6.18 ( 65Kops/s)
over_x888_8_0565 = L1: 10.32 L2: 9.85 M: 7.63 ( 21.13%) HT: 6.56 VT: 6.30 R: 6.12 RT: 3.80 ( 43Kops/s)
over_x888_8_0565 = L1: 10.64 L2: 10.17 M: 7.74 ( 21.35%) HT: 6.83 VT: 6.55 R: 6.34 RT: 4.03 ( 46Kops/s)
ARM/iwMMXt:
add_8_8_8 = L1: 13.10 L2: 11.67 M: 10.74 ( 13.46%) HT: 8.62 VT: 8.15 R: 7.94 RT: 4.39 ( 44Kops/s)
add_8_8_8 = L1: 13.81 L2: 12.79 M: 11.63 ( 13.93%) HT: 9.33 VT: 9.20 R: 9.04 RT: 5.43 ( 52Kops/s)
src_8888_8_0565 = L1: 16.62 L2: 15.07 M: 12.52 ( 27.46%) HT: 10.07 VT: 10.17 R: 9.95 RT: 5.64 ( 54Kops/s)
src_8888_8_0565 = L1: 16.84 L2: 16.11 M: 13.22 ( 27.71%) HT: 11.74 VT: 10.90 R: 10.80 RT: 6.66 ( 62Kops/s)
src_x888_8_x888 = L1: 17.49 L2: 16.22 M: 13.73 ( 38.73%) HT: 10.10 VT: 10.33 R: 9.55 RT: 5.21 ( 52Kops/s)
src_x888_8_x888 = L1: 19.33 L2: 17.66 M: 14.26 ( 38.43%) HT: 11.53 VT: 10.83 R: 10.57 RT: 6.12 ( 58Kops/s)
over_x888_8_0565 = L1: 7.57 L2: 7.29 M: 6.37 ( 15.97%) HT: 5.53 VT: 5.33 R: 5.21 RT: 3.22 ( 35Kops/s)
over_x888_8_0565 = L1: 8.15 L2: 7.56 M: 6.50 ( 15.58%) HT: 5.73 VT: 5.49 R: 5.50 RT: 3.53 ( 38Kops/s)
Matt Turner [Wed, 18 Apr 2012 20:08:57 +0000 (16:08 -0400)]
mmx: add r5g6b5 fetcher
Loongson:
add_0565_0565 = L1: 12.73 L2: 12.26 M: 10.05 ( 13.87%) HT: 8.77 VT: 8.50 R: 8.25 RT: 5.28 ( 58Kops/s)
add_0565_0565 = L1: 14.04 L2: 13.63 M: 10.96 ( 15.19%) HT: 9.73 VT: 9.43 R: 9.11 RT: 5.93 ( 64Kops/s)
ARM/iwMMXt:
add_0565_0565 = L1: 10.36 L2: 10.03 M: 9.04 ( 10.88%) HT: 3.11 VT: 7.16 R: 7.72 RT: 5.12 ( 51Kops/s)
add_0565_0565 = L1: 10.84 L2: 10.20 M: 9.15 ( 11.46%) HT: 7.60 VT: 7.82 R: 7.70 RT: 5.41 ( 53Kops/s)
Matt Turner [Tue, 17 Apr 2012 16:16:55 +0000 (12:16 -0400)]
mmx: Use Loongson pextrh instruction in expand565
Same story as pinsrh in the previous commit.
text data bss dec hex filename
25336 1952 0 27288 6a98 .libs/libpixman_loongson_mmi_la-pixman-mmx.o
25072 1952 0 27024 6990 .libs/libpixman_loongson_mmi_la-pixman-mmx.o
-dsll: 95
+dsll: 70
-dsrl: 135
+dsrl: 105
-ldc1: 462
+ldc1: 445
-lw: 721
+lw: 700
+pextrh: 30
Matt Turner [Tue, 17 Apr 2012 15:28:33 +0000 (11:28 -0400)]
mmx: Use Loongson pinsrh instruction in pack_565
The pinsrh instruction is analogous to MMX EXT's pinsrw, except like
other Loongson vector instructions it cannot access the general purpose
registers. In the cases of other Loongson vector instructions, this is a
headache, but it is actually a good thing here. Since the instruction is
different from MMX, I've named the intrinsic loongson_insert_pi16.
text data bss dec hex filename
25976 1952 0 27928 6d18 .libs/libpixman_loongson_mmi_la-pixman-mmx.o
25336 1952 0 27288 6a98 .libs/libpixman_loongson_mmi_la-pixman-mmx.o
-and: 181
+and: 147
-dsll: 143
+dsll: 95
-dsrl: 87
+dsrl: 135
-ldc1: 523
+ldc1: 462
-lw: 767
+lw: 721
+pinsrh: 35
Matt Turner [Fri, 24 Feb 2012 20:23:09 +0000 (15:23 -0500)]
mmx: don't pack and unpack src unnecessarily
The combine function was store8888'ing the result, and all consumers
were immediately load8888'ing it, causing lots of unnecessary pack and
unpack instructions.
It's a very straight forward conversion, except for mmx_combine_over_u
and mmx_combine_saturate_u. mmx_combine_over_u was testing the integer
result to skip pixels, so we use the is_* functions to test the __m64
data directly without loading it into an integer register.
For mmx_combine_saturate_u there's not a lot we can do, since it uses
DIV_UN8.
Matt Turner [Fri, 24 Feb 2012 22:39:39 +0000 (17:39 -0500)]
mmx: introduce is_equal, is_opaque, and is_zero functions
To be used by the next commit.
Matt Turner [Thu, 23 Feb 2012 21:25:11 +0000 (16:25 -0500)]
mmx: simplify srcsrcsrcsrc calculation in over_n_8_0565
Matt Turner [Thu, 23 Feb 2012 21:15:56 +0000 (16:15 -0500)]
mmx: remove unnecessary uint64_t<->__m64 conversions
Loongson:
add_8888_8888 = L1: 68.73 L2: 55.09 M: 25.39 ( 68.18%) HT: 25.28 VT: 22.42 R: 20.74 RT: 13.26 ( 131Kops/s)
add_8888_8888 = L1: 159.19 L2: 114.10 M: 30.74 ( 77.91%) HT: 27.63 VT: 24.99 R: 24.61 RT: 14.49 ( 141Kops/s)
Matt Turner [Fri, 24 Feb 2012 17:43:43 +0000 (12:43 -0500)]
mmx: compile on MIPS for Loongson MMI optimizations
image image16
evolution 32.985 -> 29.667 27.314 -> 23.870
firefox-planet-gnome 197.982 -> 180.437 220.986 -> 205.057
gnome-system-monitor 48.482 -> 49.752 52.820 -> 49.528
gnome-terminal-vim 60.799 -> 50.528 51.655 -> 44.131
grads-heat-map 3.167 -> 3.181 3.328 -> 3.321
gvim 38.646 -> 32.552 38.126 -> 34.453
midori-zoomed 44.371 -> 43.338 28.860 -> 28.865
ocitysmap 23.065 -> 18.057 23.046 -> 18.055
poppler 43.676 -> 36.077 43.065 -> 36.090
swfdec-giant-steps 20.166 -> 20.365 22.354 -> 16.578
swfdec-youtube 31.502 -> 28.118 44.052 -> 41.771
xfce4-terminal-a1 69.517 -> 51.288 62.225 -> 53.309
Matt Turner [Wed, 15 Feb 2012 06:19:07 +0000 (01:19 -0500)]
mmx: make ldq_u take __m64* directly
Before, if __m64 is allocated in vector or floating-point registers,
__m64 vs = ldq_u((uint64_t *)src);
would cause src to be loaded into an integer register and then
transferred to an __m64 register. By switching ldq_u's argument type to
__m64 we give the compile enough information to recognize that it can
load to the vector register directly.
This patch is necessary for the Loongson optimizations when __m64 is
typedef'd as double.
Matt Turner [Fri, 24 Feb 2012 17:34:41 +0000 (12:34 -0500)]
mmx: add load function and use it in add_8888_8888
Matt Turner [Fri, 24 Feb 2012 17:32:03 +0000 (12:32 -0500)]
mmx: add store function and use it in add_8888_8888
Søren Sandmann Pedersen [Thu, 5 Apr 2012 04:52:21 +0000 (00:52 -0400)]
bits_image_fetch_pixel_convolution(): Make sure channels are signed
In the computation:
srtot += RED_8 (pixel) * f
RED_8 (pixel) is an unsigned quantity, which means the signed filter
coefficient f gets converted to an unsigned integer before the
multiplication. We get away with this because when the 32 bit unsigned
result is converted to int32_t, the correct sign is produced. But if
srtot had been an int64_t, the result would have been a very large
positive number.
Fix this by explicitly casting the channels to int.
Søren Sandmann Pedersen [Thu, 5 Apr 2012 04:42:55 +0000 (00:42 -0400)]
test/utils.c: Clip values to the [0, 255] interval
Unpremultiplying a superluminescent pixel can result in values greater
than 255.
Matt Turner [Wed, 18 Apr 2012 22:14:13 +0000 (18:14 -0400)]
configure.ac: fix iwMMXt/gcc version error message
Matt Turner [Sun, 15 Apr 2012 18:03:08 +0000 (14:03 -0400)]
mmx: fix _mm_shuffle_pi16 function when compiling without optimization
The last argument must be an immediate value, and when compiling without
optimization the compiler might not recognize this. So use a macro if
not optimizing.
Matt Turner [Sun, 15 Apr 2012 18:00:17 +0000 (14:00 -0400)]
configure.ac: require >= gcc-4.5 for ARM iwMMXt
We're using a patched gcc-4.5, and having to modify configure.ac and
autoreconf between changes is annoying. And besides, 4.5, 4.6, and 4.7's
iwMMXt intrinsic support is equally broken, and we test a known broken
intrinsic in the configure test program, so the version check is rather
meaningless.
Matt Turner [Thu, 5 Apr 2012 21:36:05 +0000 (17:36 -0400)]
mmx: Use force_inline instead of __inline__ (bug 46906)
Fixes the build on MSVC.
Matt Turner [Thu, 15 Mar 2012 23:16:20 +0000 (19:16 -0400)]
mmx: enable over_n_0565 for b5g6r5
Signed-off-by: Matt Turner <mattst88@gmail.com>
Søren Sandmann Pedersen [Mon, 2 Apr 2012 19:16:18 +0000 (15:16 -0400)]
gtk-utils.c: In pixbuf_from_argb32() use a8r8g8b8_to_rgba_np()
Instead of inlining a copy of that functionality.
Søren Sandmann Pedersen [Mon, 2 Apr 2012 19:09:16 +0000 (15:09 -0400)]
test/utils.c: Rename and export the pngify_pixels() function.
This function converts from a8r8g8b8 to non-premultiplied RGBA (the
PNG or GdkPixbuf format that has the channels in this order: R, G, B,
A in memory regardless of the computer's endianness). The function's
new name is a8r8g8b8_to_rgba_np().
Søren Sandmann Pedersen [Mon, 2 Apr 2012 18:59:02 +0000 (14:59 -0400)]
gtk-utils.c: Don't include pixman-private.h
Use pixman_image_get_format() instead of image->bits.format.
Søren Sandmann Pedersen [Sun, 25 Mar 2012 16:14:54 +0000 (12:14 -0400)]
Rename fast_composite_add_1000_1000 to _add_1_1()
The 1000_1000 name is a relic from before the refactoring.
Søren Sandmann Pedersen [Sun, 16 Jan 2011 11:46:52 +0000 (06:46 -0500)]
Add the original parrot image.
This is the Parrot image that was downscaled and cropped before being
used in the composite-test.c demo.
Søren Sandmann Pedersen [Wed, 6 Oct 2010 10:06:59 +0000 (06:06 -0400)]
composite-test.c: Add a parrot image
Instead of the yellow square, use a parrot as the source image. This
demonstrates the various blend modes much better.
The parrot is a cropped version of finger painting by Rubens LP:
http://www.flickr.com/photos/dorubens/
4030604504/in/set-
72157622586088192/
where the background has been removed. Used here under Creative
Commons Attribution. The artist's web site:
http://www.rubenslp.com.br/
Søren Sandmann Pedersen [Wed, 6 Oct 2010 07:56:55 +0000 (03:56 -0400)]
composite-test.c: Use similar gradient to the one in the PDF spec.
Søren Sandmann Pedersen [Wed, 12 Oct 2011 08:49:27 +0000 (04:49 -0400)]
demos: Add checkerboard demo
This is a simple demo that displays a checkboard with a projective
transformation.
Søren Sandmann Pedersen [Wed, 12 Oct 2011 08:48:33 +0000 (04:48 -0400)]
demos: Add quad2quad program
This program can compute the projective transformation that transforms
one quadrilateral into another. The code is basically maxima[1] output
translated into C.
[1] http://maxima.sourceforge.net/
Søren Sandmann Pedersen [Wed, 14 Mar 2012 21:11:14 +0000 (17:11 -0400)]
Use "=a" and "=d" constraints for rdtsc inline assembly
In 32 bit mode the "=A" constraint refers to the register pair
edx:eax, but according to GCC developers this is not the case in 64
bit mode, where it refers to "rax".
Hence, using "=A" for rdtsc is incorrect in 64 bit mode.
See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21249
Jeremy Huddleston [Fri, 16 Mar 2012 18:37:23 +0000 (11:37 -0700)]
configure.ac: Fix a copy-paste-o in TLS detection
Regression from:
a069da6c66da407cc52e1e92321d69c68fd6beb5
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Tested-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Wed, 14 Mar 2012 20:48:00 +0000 (16:48 -0400)]
Use AC_LANG_SOURCE for DSPr2 configure program
Signed-off-by: Matt Turner <mattst88@gmail.com>
Chun-wei Fan [Fri, 9 Mar 2012 07:54:06 +0000 (15:54 +0800)]
Just include xmmintrin.h on MSVC as well
The xmmintrin.h as shipped with recent Visual C++ (2003+) provides
_mm_shuffle_pi16 and _mm_mulhi_pu16, so including that header
will do for using these functions, and MSVC does not like the GCC-specific
implementations of _mm_shuffle_pi16 and _mm_mulhi_pu16 that is
currently in the code.
_MM_SHUFFLE is declared in the same way in MSVC's xmmintrin.h, so don't
re-define it here to avoid a compilation warning.
Jeremy Huddleston [Wed, 14 Mar 2012 17:26:18 +0000 (10:26 -0700)]
Fix a false-negative in MMX check
Silence warnings that could make -Werror give a false negative
Use signed char to avoid cases where int8_t isn't declared
Reported-by: Mike Lothian <mike@fireburn.co.uk>
Tested-by: Mike Lothian <mike@fireburn.co.uk>
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Nemanja Lukic [Sun, 11 Mar 2012 17:52:25 +0000 (18:52 +0100)]
MIPS: DSPr2: Added over_n_8888_8888_ca and over_n_8888_0565_ca fast paths.
Performance numbers before/after on MIPS-74kc @ 1GHz
Referent (before):
lowlevel-blt-bench:
over_n_8888_8888_ca = L1: 8.32 L2: 7.65 M: 6.38 ( 51.08%) HT: 5.78 VT: 5.74 R: 5.84 RT: 4.39 ( 37Kops/s)
over_n_8888_0565_ca = L1: 7.40 L2: 6.95 M: 6.16 ( 41.06%) HT: 5.72 VT: 5.52 R: 5.63 RT: 4.28 ( 36Kops/s)
cairo-perf-trace:
[ # ] backend test min(s) median(s) stddev. count
[ # ] image: pixman 0.25.3
[ 0] image xfce4-terminal-a1 138.223 139.070 0.33% 6/6
[ # ] image16: pixman 0.25.3
[ 0] image16 xfce4-terminal-a1 132.763 132.939 0.06% 5/6
Optimized:
lowlevel-blt-bench:
over_n_8888_8888_ca = L1: 19.35 L2: 23.84 M: 13.68 (109.39%) HT: 11.39 VT: 11.19 R: 11.27 RT: 6.90 ( 47Kops/s)
over_n_8888_0565_ca = L1: 18.68 L2: 17.00 M: 12.56 ( 83.70%) HT: 10.72 VT: 10.45 R: 10.43 RT: 5.79 ( 43Kops/s)
cairo-perf-trace:
[ # ] backend test min(s) median(s) stddev. count
[ # ] image: pixman 0.25.3
[ 0] image xfce4-terminal-a1 130.400 131.720 0.46% 6/6
[ # ] image16: pixman 0.25.3
[ 0] image16 xfce4-terminal-a1 125.830 126.604 0.34% 6/6
Jeremy Huddleston [Thu, 8 Mar 2012 17:41:34 +0000 (09:41 -0800)]
Expand TLS support beyond __thread to __declspec(thread)
This code was pretty much coppied from a similar commit that I made to
xorg-server in April.
cf: xorg/xserver:
bb4d145bd25e2aee988b100ecf1105ea3b6a40b8
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Thu, 8 Mar 2012 17:41:32 +0000 (09:41 -0800)]
Disable MMX when incompatible clang is being used.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Thu, 8 Mar 2012 17:41:33 +0000 (09:41 -0800)]
Silence a warning about unused pixman_have_mmx
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Jeremy Huddleston [Thu, 8 Mar 2012 17:41:31 +0000 (09:41 -0800)]
Revert "Disable MMX when Clang is being used."
This reverts commit
5eb4c12a79b3017ec6cc22ab756f53f225731533.
Søren Sandmann Pedersen [Thu, 8 Mar 2012 15:11:20 +0000 (10:11 -0500)]
Post-release version bump to 0.25.3
Søren Sandmann Pedersen [Thu, 8 Mar 2012 14:33:16 +0000 (09:33 -0500)]
Pre-release version bump to 0.25.2
Søren Sandmann Pedersen [Thu, 8 Mar 2012 14:29:46 +0000 (09:29 -0500)]
mmx: Squash a warning by making the argument to ldl_u() const
Alan Coopersmith [Sat, 25 Feb 2012 02:02:56 +0000 (18:02 -0800)]
Just use xmmintrin.h when building with Solaris Studio compilers
Since the Solaris Studio compilers don't have a mode where MMX
instructions are available and SSE instructions are not, we can
just use the <xmmintrin.h> header directly.
Fixes build failure due to Studio not supporting the __gnu_inline__
or __artificial__ attributes.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Acked-by: Matt Turner <mattst88@gmail.com>
Nemanja Lukic [Wed, 29 Feb 2012 11:04:33 +0000 (12:04 +0100)]
MIPS: DSPr2: Added mips_dspr2_blt and mips_dspr2_fill routines.
Performance numbers before/after on MIPS-74kc @ 1GHz
Referent (before):
lowlevel-blt-bench:
src_n_0565 = L1: 238.14 L2: 233.15 M: 57.88 ( 77.23%) HT: 53.22 VT: 49.99 R: 47.73 RT: 24.79 ( 91Kops/s)
src_n_8888 = L1: 190.19 L2: 187.57 M: 28.94 ( 77.23%) HT: 27.91 VT: 27.33 R: 26.64 RT: 14.68 ( 77Kops/s)
cairo-perf-trace:
[ # ] backend test min(s) median(s) stddev. count
[ # ] image: pixman 0.25.1
[ 0] image gnome-system-monitor 268.460 269.712 0.22% 6/6
Optimized:
lowlevel-blt-bench:
src_n_0565 = L1:1081.39 L2: 258.22 M:189.59 (252.91%) HT: 60.23 VT: 55.01 R: 53.44 RT: 23.68 ( 89Kops/s)
src_n_8888 = L1: 653.46 L2: 113.55 M:135.26 (360.86%) HT: 38.99 VT: 37.38 R: 34.95 RT: 18.67 ( 84Kops/s)
cairo-perf-trace:
[ # ] backend test min(s) median(s) stddev. count
[ # ] image: pixman 0.25.1
[ 0] image gnome-system-monitor 246.565 246.706 0.04% 6/6
Søren Sandmann Pedersen [Thu, 1 Mar 2012 07:24:54 +0000 (02:24 -0500)]
pixman-access.c: Remove some unused macros
The macros related to palette entries:
RGB15_TO_ENTRY,
RGB24_TO_ENTRY,
RGB24_TO_ENTRY_Y
are not used anywhere.
Søren Sandmann Pedersen [Wed, 29 Feb 2012 09:44:46 +0000 (04:44 -0500)]
pixman-accessors.h: Delete unused macros
The MEMCPY_WRAPPED and ACCESS macros are not used anymore.
Søren Sandmann Pedersen [Sun, 26 Feb 2012 22:35:20 +0000 (17:35 -0500)]
Move fetching for solid bits images to pixman-noop.c
This should be a bit faster because it can reuse the scanline on each iteration.
Matt Turner [Sat, 25 Feb 2012 01:11:11 +0000 (20:11 -0500)]
lowlevel-blt-bench: add in_8_8 and in_n_8_8
Signed-off-by: Matt Turner <mattst88@gmail.com>
Søren Sandmann Pedersen [Wed, 26 Jan 2011 18:16:09 +0000 (13:16 -0500)]
Disable implementations mentioned in the PIXMAN_DISABLE environment variable.
With this, it becomes possible to do
PIXMAN_DISABLE="sse2 mmx" some_app
which will run some_app without SSE2 and MMX enabled. This is useful
for benchmarking, testing and narrowing down bugs.
The current list of implementations that can be disabled:
fast
mmx
sse2
arm-simd
arm-iwmmxt
arm-neon
mips-dspr2
vmx
The general and noop implementations can't be disabled because pixman
depends on those being available for correct operation.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Nemanja Lukic [Wed, 22 Feb 2012 13:23:48 +0000 (14:23 +0100)]
MIPS: DSPr2: Added fast-paths for SRC operation.
Following fast-path functions are implemented (routines 4, 5 and 6 utilize
same fast-memcpy routine):
1. src_x888_8888
2. src_8888_0565
3. src_0565_8888
4. src_0565_0565
5. src_8888_8888
6. src_0888_0888
Performance numbers before/after on MIPS-74kc @ 1GHz
Referent (before):
lowlevel-blt-bench:
src_x888_8888 = L1: 199.35 L2: 96.54 M: 18.87 (100.68%) HT: 17.12 VT: 16.24 R: 15.43 RT: 9.33 ( 61Kops/s)
src_8888_0565 = L1: 71.22 L2: 51.95 M: 24.19 ( 96.17%) HT: 20.71 VT: 19.92 R: 18.15 RT: 9.92 ( 63Kops/s)
src_0565_8888 = L1: 38.82 L2: 36.22 M: 18.60 ( 73.95%) HT: 14.47 VT: 13.19 R: 12.97 RT: 6.61 ( 49Kops/s)
src_0565_0565 = L1: 286.05 L2: 155.02 M: 37.68 (100.54%) HT: 31.08 VT: 28.07 R: 26.26 RT: 11.93 ( 68Kops/s)
src_8888_8888 = L1: 454.32 L2: 139.15 M: 19.30 (102.98%) HT: 17.73 VT: 16.08 R: 16.62 RT: 10.45 ( 64Kops/s)
src_0888_0888 = L1: 190.47 L2: 106.14 M: 25.26 (101.08%) HT: 21.88 VT: 20.32 R: 18.83 RT: 10.10 ( 63Kops/s)
cairo-perf-trace:
[ # ] backend test min(s) median(s) stddev. count
[ # ] image: pixman 0.25.1
[ 0] image firefox-asteroids 421.215 421.325 0.01% 4/6
[ 1] image firefox-planet-gnome 647.708 648.486 0.13% 6/6
[ 2] image gnome-system-monitor 276.073 277.506 0.38% 6/6
[ 3] image gnome-terminal-vim 263.866 265.229 0.39% 6/6
[ 4] image poppler 123.576 124.003 0.15% 6/6
Optimized (with these optimizations):
lowlevel-blt-bench:
src_x888_8888 = L1: 369.50 L2: 99.37 M: 27.19 (145.07%) HT: 20.24 VT: 19.48 R: 19.00 RT: 10.22 ( 63Kops/s)
src_8888_0565 = L1: 105.65 L2: 67.87 M: 25.41 (101.00%) HT: 20.78 VT: 19.84 R: 18.52 RT: 9.81 ( 63Kops/s)
src_0565_8888 = L1: 77.10 L2: 63.04 M: 23.37 ( 92.90%) HT: 20.29 VT: 19.37 R: 18.14 RT: 10.02 ( 63Kops/s)
src_0565_0565 = L1: 519.02 L2: 241.32 M: 62.35 (166.34%) HT: 33.74 VT: 27.63 R: 26.12 RT: 11.70 ( 67Kops/s)
src_8888_8888 = L1: 390.48 L2: 113.99 M: 30.32 (161.77%) HT: 19.55 VT: 17.05 R: 17.13 RT: 10.19 ( 63Kops/s)
src_0888_0888 = L1: 349.74 L2: 156.68 M: 40.68 (162.78%) HT: 25.58 VT: 20.57 R: 20.20 RT: 9.96 ( 63Kops/s)
cairo-perf-trace:
[ # ] backend test min(s) median(s) stddev. count
[ # ] image: pixman 0.25.1
[ 0] image firefox-asteroids 400.050 400.308 0.04% 6/6
[ 1] image firefox-planet-gnome 628.978 629.364 0.07% 6/6
[ 2] image gnome-system-monitor 270.247 270.313 0.03% 6/6
[ 3] image gnome-terminal-vim 256.413 257.641 0.21% 6/6
[ 4] image poppler 119.540 120.023 0.21% 6/6
Nemanja Lukic [Wed, 22 Feb 2012 13:23:47 +0000 (14:23 +0100)]
MIPS: DSPr2: Basic infrastructure for MIPS architecture
MIPS DSP instruction set extensions
Matt Turner [Sat, 25 Feb 2012 01:02:55 +0000 (20:02 -0500)]
lowlevel-blt: add over_x888_n_8888
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Sat, 25 Feb 2012 00:58:09 +0000 (19:58 -0500)]
lowlevel-blt: add over_8888_8888
Signed-off-by: Matt Turner <mattst88@gmail.com>
Søren Sandmann Pedersen [Thu, 23 Feb 2012 23:36:04 +0000 (18:36 -0500)]
Disable MMX when Clang is being used.
There are several issues with the Clang compiler and pixman-mmx.c:
- When not optimizing, it doesn't seem to recognize that an argument
to an __always_inline__ function is compile-time constant. This
results in this error being produced:
fatal error: error in backend: Invalid operand for inline asm
constraint 'K'!
- This inline assembly:
asm ("pmulhuw %1, %0\n\t"
: "+y" (__A)
: "y" (__B)
);
results in
fatal error: error in backend: Unsupported asm: input constraint
with a matching output constraint of incompatible type!
So disable MMX when the compiler is Clang.
Matt Turner [Wed, 22 Feb 2012 04:33:02 +0000 (23:33 -0500)]
mmx: make load8888 take a pointer to data instead of the data itself
Allows us to tune how we load data into the vector registers.
Signed-off-by: Matt Turner <mattst88@gmail.com>
And squashed in:
mmx: define and use load8888u function
For unaligned loads.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Wed, 22 Feb 2012 00:29:59 +0000 (19:29 -0500)]
mmx: make store8888 take uint32_t *dest as argument
Allows us to tune how we store data from the vector registers.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Wed, 22 Feb 2012 21:32:21 +0000 (16:32 -0500)]
Update .gitignore with more demos and tests
Signed-off-by: Matt Turner <mattst88@gmail.com>
Søren Sandmann Pedersen [Wed, 22 Feb 2012 00:30:04 +0000 (19:30 -0500)]
mmx: Delete unused function in_over_full_src_alpha()
Also a few minor formatting fixes.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Søren Sandmann Pedersen [Wed, 22 Feb 2012 00:23:33 +0000 (19:23 -0500)]
mmx: Enable over_x888_8_8888() for x86 as well
It used to be slower than the generic code (with the gcc that was
current in 2007), but that doesn't seem to be the case anymore:
over_x888_8_8888 = L1: 22.97 L2: 22.88 M: 22.27 ( 5.29%) HT: 18.30 VT: 15.81 R: 15.54 RT: 10.35 ( 131Kops/s)
over_x888_8_8888 = L1: 53.56 L2: 53.20 M: 50.50 ( 11.99%) HT: 38.60 VT: 31.19 R: 29.00 RT: 17.37 ( 208Kops/s)
Reviewed-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Tue, 21 Feb 2012 21:28:37 +0000 (16:28 -0500)]
mmx: fix typo in pix_add_mul on MSVC
Typo introduced in commit
a075a870.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Sun, 19 Feb 2012 23:10:03 +0000 (18:10 -0500)]
mmx: Use _mm_shuffle_pi16
The pshufw x86 instruction is part of Extended 3DNow! and SSE1. The
equivalent ARM wshufh instruction was available from the first iwMMXt
instrucion set.
This instruction is already used in the SSE2 code.
Reduces code size by ~9%.
amd64
text data bss dec hex filename
29925 2240 0 32165 7da5 .libs/libpixman_mmx_la-pixman-mmx.o
27237 2240 0 29477 7325 .libs/libpixman_mmx_la-pixman-mmx.o
x86
text data bss dec hex filename
27677 1792 0 29469 731d .libs/libpixman_mmx_la-pixman-mmx.o
24959 1792 0 26751 687f .libs/libpixman_mmx_la-pixman-mmx.o
arm
text data bss dec hex filename
30176 1792 0 31968 7ce0 .libs/libpixman_iwmmxt_la-pixman-mmx.o
27384 1792 0 29176 71f8 .libs/libpixman_iwmmxt_la-pixman-mmx.o
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Sun, 19 Feb 2012 06:32:31 +0000 (01:32 -0500)]
mmx: Use _mm_mulhi_pu16
The pmulhuw x86 instruction is part of Extended 3DNow! and SSE1. The
equivalent ARM wmuluh instruction was available from the first iwMMXt
instrucion set.
This instruction is already used in the SSE2 code.
Reduces code size by ~5%.
amd64
text data bss dec hex filename
31325 2240 0 33565 831d .libs/libpixman_mmx_la-pixman-mmx.o
29925 2240 0 32165 7da5 .libs/libpixman_mmx_la-pixman-mmx.o
x86
text data bss dec hex filename
29165 1792 0 30957 78ed .libs/libpixman_mmx_la-pixman-mmx.o
27677 1792 0 29469 731d .libs/libpixman_mmx_la-pixman-mmx.o
arm
text data bss dec hex filename
31632 1792 0 33424 8290 .libs/libpixman_iwmmxt_la-pixman-mmx.o
30176 1792 0 31968 7ce0 .libs/libpixman_iwmmxt_la-pixman-mmx.o
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Tue, 21 Feb 2012 00:05:45 +0000 (00:05 +0000)]
mmx: enable over_x888_8_8888 on ARM/iwMMXt
before: over_x888_8_8888 = L1: 7.63 L2: 7.72 M: 6.44 ( 19.17%) HT: 6.24 VT: 6.11 R: 5.87 RT: 4.61 ( 51Kops/s)
after : over_x888_8_8888 = L1: 11.88 L2: 11.11 M: 8.70 ( 26.01%) HT: 8.15 VT: 8.07 R: 7.76 RT: 5.62 ( 61Kops/s)
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Mon, 20 Feb 2012 23:36:24 +0000 (18:36 -0500)]
autoconf: use #error instead of error
We'd rather see the actual #error message rather than a syntax error in
config.log.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Fri, 17 Feb 2012 23:17:49 +0000 (18:17 -0500)]
Convert while (w) to if (w) when possible
Missed in commit
57fd8c37.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Matt Turner [Wed, 15 Feb 2012 23:16:42 +0000 (18:16 -0500)]
Make sure to run AC_SUBST IWMMXT_CFLAGS
Allows you to compile without -flax-vector-conversions in your CFLAGS,
though -march=iwmmxt2 is still necessary since specifying some other
-march= value will override it, and disable iwmmxt.
Signed-off-by: Matt Turner <mattst88@gmail.com>
Jeremy Huddleston [Sat, 11 Feb 2012 09:04:13 +0000 (01:04 -0800)]
configure.ac: Add an --enable-libpng option
Now there is a way to not link against libpng even if it's available.
Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Matt Turner [Sun, 12 Feb 2012 04:21:45 +0000 (23:21 -0500)]
Use AC_LANG_SOURCE for iwMMXt configure program
Signed-off-by: Matt Turner <mattst88@gmail.com>
Søren Sandmann Pedersen [Wed, 25 Jan 2012 19:03:05 +0000 (14:03 -0500)]
Revert "Reject trapezoids where top (botttom) is above (below) the edges"
Cairo 1.10 will sometimes generate trapezoids like this, so we can't
consider them invalid. Fixes bug 45009, reported by Michael Biebl.
This reverts commit
2437ae80e5066dec9fe52f56b016bf136d7cea06.
Bobby Salazar [Thu, 26 Jan 2012 18:19:18 +0000 (13:19 -0500)]
iOS Runtime Detection Support For ARM NEON
This patch adds runtime detection support for the ARM NEON fast paths
for code compiled with the iOS SDK.
Søren Sandmann Pedersen [Tue, 20 Dec 2011 00:31:25 +0000 (19:31 -0500)]
test: Port composite test over to use new pixel_checker_t object.
Also make some tweaks to the way the errors are printed.
Søren Sandmann Pedersen [Mon, 19 Dec 2011 22:31:06 +0000 (17:31 -0500)]
test: Add a new "pixel_checker_t" object.
Add a new pixel_checker_t object to test/utils.[ch]. This object
should be initialized with a format and can then be used to check
whether a given "real" pixel in that format is close enough to a
"perfect" pixel given as a double precision ARGB struct.
The acceptable deviation is calcuated as follows. Each channel of the
perfect pixel has 0.004 subtracted from it and is then converted to
the format. The resulting value is the minimum value that will be
accepted. Similarly, to compute the maximum value, the channel has
0.004 added to it and is then converted to the given format. Checking
a pixel is then a matter of splitting it into channels and checking
that each is within the computed bounds.
The value of 0.004 was chosen because it is the minimum one that will
make the existing composite test pass (see next commit). A problem
with this value is that it causes 0xFE to be acceptable when the
correct value is 1.0, and 0x01 to be acceptable when the correct value
is 0. It would be better if, when the result is exactly 0 or exactly
1, an a8r8g8b8 pixel were required to produce exactly 0x00 or 0xff to
preserve full black and full white. A deviation value of 0.003 would
produce this, but currently this would cause tests with operators that
involve divisions to fail.
Søren Sandmann Pedersen [Tue, 20 Dec 2011 00:53:28 +0000 (19:53 -0500)]
Rename color_correct() to round_color()
And do the rounding from float to int in the same way cairo does: by
multiplying with (1 << width), then subtracting one when the input was 1.0.
Søren Sandmann Pedersen [Thu, 22 Dec 2011 23:15:02 +0000 (18:15 -0500)]
Move the color_correct() function from composite.c to utils.c
Søren Sandmann Pedersen [Sun, 8 Jan 2012 15:32:47 +0000 (10:32 -0500)]
Get rid of delegates for combiners
Add a new function _pixman_implementation_lookup_combiner() that will
find a usable combiner given an operator and information about whether
the combiner should apply component alpha and whether it should be 64
bit.
In pixman-general.c use this function to look up a combiner up front
instead of walking the delegate chain for every scanline.
Søren Sandmann Pedersen [Sat, 7 Jan 2012 22:11:45 +0000 (17:11 -0500)]
test/alphamap.c: Make dst and orig_dst more independent of each other
When making the copy of the destination, do so separately for the
image and the alpha map. This ensures that the alpha channel of the
alpha map will be different from the alpha channel of the actual
image.
Previously, orig_dst would be copied onto dst along with its alpha
map, which mean that the alpha map of orig_dst would become the new
alpha channel of *both* dst and dst's alpha map. This meant that test
didn't actually test that the alpha maps alpha channel was actually
fetched.
Søren Sandmann Pedersen [Sat, 7 Jan 2012 21:48:00 +0000 (16:48 -0500)]
Fix bugs with alpha maps
The alpha channel from the alpha map must be inserted as the new alpha
channel when a scanline is fetched from an image. Previously the alpha
map would overwrite the buffer instead. This wasn't caught be the
alpha map test because it would only verify that the resulting alpha
channel was correct, and not pay attention to incorrect color
channels.
Søren Sandmann Pedersen [Sat, 7 Jan 2012 19:32:08 +0000 (14:32 -0500)]
test: In the alphamap test, also test that we get the right red value
There is a bug where the red channel of the alpha map of the
destination image is used instead of the red channel of the
destination image itself.
Alan Coopersmith [Sat, 24 Dec 2011 00:32:57 +0000 (16:32 -0800)]
Make mmx code compatible with Solaris Studio 12.3 compilers
Rearranged some of the existing gcc & Intel compiler checks to allow
easier sharing of common cases among the compilers.
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Søren Sandmann Pedersen [Tue, 20 Dec 2011 11:32:26 +0000 (06:32 -0500)]
Fix rounding for DIV_UNc()
We need to compute floor (a/b * 255 + 0.5), not floor (a / b * 255),
so add b/2 to the numerator in the DIV_UNc() macro.
Søren Sandmann Pedersen [Thu, 22 Dec 2011 16:37:26 +0000 (11:37 -0500)]
Reject trapezoids where top (botttom) is above (below) the edges
When a trapezoid has a top/bottom that is above/below the left/right
edges, degenerate trapezoids become possible. For example the edge
could be very short and close to horizontal. If the bottom edge is far
below the bottom point of such a short edge, the result is that the
lower right corner of the trapezoid will be extremely far to the left.
This kind of trapezoid causes overflows in the rasterization code, so
change pixman_trapezoid_valid() to reject them.
Søren Sandmann Pedersen [Tue, 20 Dec 2011 11:34:41 +0000 (06:34 -0500)]
In MUL_UNc() cast to comp2_t
Otherwise, when comp1_t is 16 bits wide, we can end up with a signed
integer overflow.
Søren Sandmann Pedersen [Wed, 21 Dec 2011 13:19:05 +0000 (08:19 -0500)]
Fix a bunch of signed overflow issues
In pixman-fast-path.c: (1 << 31) - 1 causes a signed overflow, so
change to (1U << n) - 1.
In pixman-image.c: The check for whether m10 == -m01 will overflow
when -m01 == INT_MIN. Instead just check whether the variables are 1
and -1.
In pixman-utils.c: When the depth of the topmost channel is 0, we can
end up shifting by 32.
In blitters-test.c: Replicating the mask would end up shifting more
than 32.
In region-contains-test.c: Computing the average of two large integers
could overflow. Instead add half the difference between them to the
first integer.
In stress-test.c: Masking the value in fake_reader() would sometimes
shift by 32. Instead just use the most significant bits instead of
the least significant.
All these issues were found by the IOC tool:
http://embed.cs.utah.edu/ioc/
Søren Sandmann Pedersen [Sun, 18 Dec 2011 14:54:47 +0000 (09:54 -0500)]
Add missing cast in _pixman_edge_multi_init()
nx and e->dy are both 32 bit quantities, so a cast is needed to make
sure their product is 64 bit before subtracting it from a 64 bit
quantity.
Søren Sandmann Pedersen [Sun, 18 Dec 2011 13:16:45 +0000 (08:16 -0500)]
Fix some signed overflow bugs
In the macros for the PDF blend modes, two comp1_t variables are
multiplied together and then used as if the result were a
comp4_t. When comp1_t is a uint8_t, this is fine because they are
promoted to int, and the product of two uint8_ts fits in an
int. However, when comp1_t is uint16, the product does not necessarily
fit in an int, so casts are necessary.
Fix for bug 43906, reported by Siarhei Siamashka.
Søren Sandmann Pedersen [Thu, 5 Jan 2012 15:37:51 +0000 (10:37 -0500)]
pixman-image.c: Fix typo in pixman_image_set_transform()
A parenthesis was misplaced so that the size argument to memcmp() was
always 0. The bug is harmless except that the flags might be
unnecessarily recomputed in some cases.
A bug reporting this in Mozilla's fork was discovered here:
https://bugzilla.mozilla.org/show_bug.cgi?id=710992
Colin Walters [Wed, 4 Jan 2012 13:06:05 +0000 (08:06 -0500)]
autogen.sh: Support GNOME Build API
http://people.gnome.org/~walters/docs/build-api.txt
Søren Sandmann Pedersen [Sun, 18 Dec 2011 12:29:59 +0000 (07:29 -0500)]
gradient-walker: For NONE repeats, when x < 0 or x > 1, set both colors to 0
ec7c9c2b6865b48b8bd14e4 introduced a bug where NONE gradients would be
misrendered, causing the area outside the gradient to be treated as a
(very) long fade to transparent.The problem was that a check for
positions outside the gradients were dropped in favor of relying on
the sentinels.
Aside from misrendering, this also caused a signed integer overflow
when the code would compute a stepper size based on MIN_INT32.
This patches fixes the issue by reinstating a check for these cases
and setting both the right and left colors to transparent black.
Søren Sandmann Pedersen [Wed, 21 Dec 2011 10:19:00 +0000 (05:19 -0500)]
Modify gradient-test to show a bug in NONE processing
This patch modifies demos/gradient-test to display a bug in gradients
with a repeat mode of NONE. With the current gradient code, the left
side will be a solid red (actually an extremely long fade from solid
red to transparent) instead of a sharp transition from red to green.
Søren Sandmann Pedersen [Fri, 9 Dec 2011 08:59:04 +0000 (03:59 -0500)]
region: Add pixman_region{,32}_clear() functions.
These functions simply reset the region to empty. They are equivalent
to
pixman_region_fini (®ion);
pixman_region_init (®ion);
Bobby Salazar [Tue, 13 Dec 2011 07:03:16 +0000 (02:03 -0500)]
Android Runtime Detection Support For ARM NEON
This patch adds runtime detection support for the ARM NEON fast paths
for code compiled with the Android NDK. This is the only code change
needed to enable the ARM NEON pixman fast paths for the ever growing
Android platform (200 million+ smartphones, tablets, etc.). Just make
sure to #define USE_ARM_NEON in your makefile.
Naohiro Aota [Thu, 24 Nov 2011 12:12:15 +0000 (13:12 +0100)]
Don't use non-POSIX test
test "$test_CFLAGS" == "" && \
may cause an error on some POSIX shells and uses a style which is not
consistent with the other tests in configure.ac
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=42588 and
https://bugs.gentoo.org/show_bug.cgi?id=387087
Andrea Canciani [Tue, 8 Nov 2011 21:00:46 +0000 (22:00 +0100)]
test: Produce autotools-looking report in the win32 build system
Tweak the commands used to run the tests on win32 to make the output
look mostly like that produced by the autotools test system.
In addition to this, make sure that the exit status of the test target
is success (0) if and only if no failure occurred.
Andrea Canciani [Thu, 3 Nov 2011 10:07:25 +0000 (11:07 +0100)]
demos: Consistently use G_N_ELEMENTS()
Instead of open-coding G_N_ELEMENTS(), just use it.
Andrea Canciani [Thu, 3 Nov 2011 09:53:10 +0000 (10:53 +0100)]
test: Reuse the ARRAY_LENGTH() macro
It is provided by utils.h, there is no need to redefine it.
Andrea Canciani [Thu, 3 Nov 2011 09:51:27 +0000 (10:51 +0100)]
Use the ARRAY_LENGTH() macro when possible
This patch has been generated by the following Coccinelle semantic patch:
// Use the ARRAY_LENGTH() macro when possible
//
// Replace open-coded array length computations with the
// ARRAY_LENGTH() macro
@@
type T;
T[] E;
@@
- (sizeof(E)/sizeof(T))
+ ARRAY_LENGTH (E)
Andrea Canciani [Thu, 3 Nov 2011 09:40:24 +0000 (10:40 +0100)]
test: Cleanup includes
All the tests are linked to libutil, hence it makes sence to always
include utils.h and reuse what it provides (config.h inclusion, access
to private pixman APIs, ARRAY_LENGTH, ...).
Andrea Canciani [Thu, 3 Nov 2011 09:21:41 +0000 (10:21 +0100)]
Remove useless checks for NULL before freeing
This patch has been generated by the following Coccinelle semantic patch:
// Remove useless checks for NULL before freeing
//
// free (NULL) is a no-op, so there is no need to avoid it
@@
expression E;
@@
+ free (E);
+ E = NULL;
- if (unlikely (E != NULL)) {
- free(E);
(
- E = NULL;
|
- E = 0;
)
...
- }
@@
expression E;
@@
+ free (E);
- if (unlikely (E != NULL)) {
- free (E);
- }
Søren Sandmann Pedersen [Sun, 6 Nov 2011 21:36:01 +0000 (16:36 -0500)]
Post-release version bump to 0.25.1