Commit Graph

1970 Commits

Author SHA1 Message Date
Søren Sandmann Pedersen
ec8b36f010 Don't change the constant source in fast_composite_over_n_8888_0565. 2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
de8fff746b Fix bugs in combine_over_reverse_ca().
The computation cannot be optimized away when alpha is 0 because that
can happen when the source has alpha zero and rgb non-zero.
2009-08-08 18:50:17 -04:00
Søren Sandmann Pedersen
7b1df41b61 Add a dirty bit to the image struct, and validate before using the image.
This cuts down the number of property_changed calls significantly.
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
942c4ac282 Add sse2 version of add_n_8888_8888() 2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
23d3820116 Add a fast path for the add_n_8888_8888() operation.
It shows up on gnome-terminal traces.
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
c606a05213 Move bounds checks for REPEAT_NONE to get_pixel()
On a P4, this is a large speedup for the swfdec-fill-rate-2xaa trace:

After:

[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]    image        swfdec-fill-rate-2xaa   33.061   33.061   0.00%    1/1

Before:

[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]    image        swfdec-fill-rate-2xaa   40.342   40.342   0.00%    1/1

Pixman 0.14.0 produces this:

[ # ]  backend                         test   min(s) median(s) stddev. count
[  0]    image        swfdec-fill-rate-2xaa   36.896   36.896   0.00%    1/1
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
1bec3e8395 Remove leftover 0xffffffff in repeat() 2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
1b98166b01 Remove unused function 2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
06836d35d2 Misc formatting 2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
7c8959ea3b Change all the fetch_pixels() functions to only fetch one pixel. 2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
31096446b6 Add fetch_pixel_raw_32 and fetch_pixel_32 virtual functions.
By default both are intialized to bits_image_fetch_pixel_raw(), but if
there is an alpha map, then fetch_pixel_32() is set to
bits_image_fetch_pixel_alpha().
2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
a233b332cd Various renamings and clean-ups 2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
073399b09f Change bits_image_fetch_alpha_pixels() to fetch just one pixel. 2009-08-08 16:52:38 -04:00
Søren Sandmann Pedersen
6d1dfc3945 Change bits_image_fetch_pixels_convolution() to fetch just one pixel. 2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
b3f849f74f Change bits_image_fetch_bilinear_pixels() to fetch one pixel at a time. 2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
a37383a2c6 Make the repeat routine work on only one coordinate at a time. 2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
a4f3fd3b25 Make bits_image_fetch_nearest() return one pixel.
Previously it would work on a buffer of coordinates.
2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
f382865ebe Change bits_image_fetch_transformed() to work one pixel at a time.
Previously, it would generate a buffer of coordinates, then pass that
off to a pixel fetcher, but this caused a large performance regression
with the swfdec-fill-rate-2xfsaa cairo trace.

This is the first step towards fixing that.
2009-08-08 16:52:37 -04:00
Søren Sandmann Pedersen
4ef2807c3a Only define PIXMAN_TIMERS if timers are actually enabled [bug 23169] 2009-08-07 00:11:20 -04:00
Søren Sandmann Pedersen
9dec2e352b Various updates to the CODING_STYLE document 2009-07-28 09:58:52 -04:00
Søren Sandmann Pedersen
2abd56e9e3 Add a CODING_STYLE document based on the one from cairo. 2009-07-28 04:05:26 -04:00
Søren Sandmann Pedersen
fdd01bcbd4 Remove a couple of unused variables 2009-07-24 05:55:48 -04:00
Søren Sandmann Pedersen
845910c200 Rename source_pict_class_t to source_image_class_t 2009-07-24 05:55:48 -04:00
Søren Sandmann Pedersen
edd476d5be Replace a bunch of 'pict's with 'image' 2009-07-24 05:55:48 -04:00
Chris Wilson
11d888a283 Explain how we can simplify the radial gradient computation
Soeren rightfully complained that I had removed all the comments from
André's patch, most importantly that explain why the transformation is
valid. So add a few details to show that B varies linearly across the
scanline and how we can therefore reduce the per-pixel cost of evaluating
B.
2009-07-24 09:36:08 +01:00
Chris Wilson
20d2df0305 Fix inversion of radial gradients when r2 > r1
Fixes: Bug 22908 -- Invalid output of radial gradient
http://bugs.freedesktop.org/show_bug.cgi?id=22908

We also include a modified patch by André Tupinambá <andrelrt@gmail.com>,
to pull constant expressions out of the inner radial gradient walker.
2009-07-23 19:08:40 +01:00
Benjamin Otte
84b7df0939 Don't warn for empty rectangles, only degenerate ones 2009-07-23 09:54:49 +02:00
Julien Cristau
cb7de5b2f7 Bump shlibs and update symbols file
New pixman_disable_out_of_bounds_workaround API and new formats.
2009-07-21 16:39:02 +02:00
Julien Cristau
044122c11c Update changelogs 2009-07-21 16:23:33 +02:00
Julien Cristau
7df0ced38a Merge commit 'pixman-0.15.18' into debian-experimental 2009-07-21 15:32:27 +02:00
Benjamin Otte
1435c8aa3d Log errors for invalid rectangles passed to region code 2009-07-21 15:00:52 +02:00
Benjamin Otte
1796e6bf17 Simplify code that logs errors 2009-07-21 14:57:59 +02:00
Benjamin Otte
85d56f3f7c Make the text when reporting a broken region more useful 2009-07-21 14:50:30 +02:00
Søren Sandmann Pedersen
a77d4ffeb6 Post-release version bump 2009-07-21 07:24:40 -04:00
Søren Sandmann Pedersen
f3ac136877 Pre-release version bump 2009-07-21 07:20:57 -04:00
Søren Sandmann Pedersen
7c56911e3b Don't assert when malformed regions are detected.
Instead print a message to stderr so that it will end up in the X log
file.
2009-07-21 07:01:10 -04:00
Søren Sandmann Pedersen
f9660ce29e Fix another search and replace issue 2009-07-21 04:23:56 -04:00
Søren Sandmann Pedersen
b3196b6327 Fix search-and-replace issue pointed out by Koen Kooi. 2009-07-21 04:18:35 -04:00
George Yohng
0ff5733c16 Add implementation of MMX __m64 functions for MSVC x64.
Microsoft C++ does not define __m64 and all related MMX functions in
x64.  However, it succeeds in generating object files for SSE2 code
inside pixman.

The real problem happens during linking, when it cannot find MMX functions
(which are not defined as intrinsics for AMD64 platform).

I have implemented those missing functions using general programming.

MMX __m64 is used relatively scarcely within SSE2 implementation, and the
performance impact probably is negligible.

Bug 22390.
2009-07-21 03:43:42 -04:00
Chris Wilson
0b95afd259 Fix read of BITS members from a solid image.
During the fast-path query, the read_func and write_func from the bits
structure are queried for the solid image.

==32723== Conditional jump or move depends on uninitialised value(s)
==32723==    at 0x412AF20: _pixman_run_fast_path (pixman-utils.c:681)
==32723==    by 0x4136319: sse2_composite (pixman-sse2.c:5554)
==32723==    by 0x4100CD2: _pixman_implementation_composite
(pixman-implementation.c:227)
==32723==    by 0x412396E: pixman_image_composite (pixman.c:140)
==32723==    by 0x4123D64: pixman_image_fill_rectangles (pixman.c:322)
==32723==    by 0x40482B7: _cairo_image_surface_fill_rectangles
(cairo-image-surface.c:1180)
==32723==    by 0x4063BE7: _cairo_surface_fill_rectangles
(cairo-surface.c:1883)
==32723==    by 0x4063E38: _cairo_surface_fill_region
(cairo-surface.c:1840)
==32723==    by 0x4067FDC: _clip_and_composite_trapezoids
(cairo-surface-fallback.c:625)
==32723==    by 0x40689C5: _cairo_surface_fallback_paint
(cairo-surface-fallback.c:835)
==32723==    by 0x4065731: _cairo_surface_paint (cairo-surface.c:1923)
==32723==    by 0x4044098: _cairo_gstate_paint (cairo-gstate.c:900)
==32723==  Uninitialised value was created by a heap allocation
==32723==    at 0x402732D: malloc (vg_replace_malloc.c:180)
==32723==    by 0x410099F: _pixman_image_allocate (pixman-image.c:100)
==32723==    by 0x41265B8: pixman_image_create_solid_fill
(pixman-solid-fill.c:75)
==32723==    by 0x4123CE1: pixman_image_fill_rectangles (pixman.c:314)
==32723==    by 0x40482B7: _cairo_image_surface_fill_rectangles
(cairo-image-surface.c:1180)
==32723==    by 0x4063BE7: _cairo_surface_fill_rectangles
(cairo-surface.c:1883)
==32723==    by 0x4063E38: _cairo_surface_fill_region
(cairo-surface.c:1840)
==32723==    by 0x4067FDC: _clip_and_composite_trapezoids
(cairo-surface-fallback.c:625)
==32723==    by 0x40689C5: _cairo_surface_fallback_paint
(cairo-surface-fallback.c:835)
==32723==    by 0x4065731: _cairo_surface_paint (cairo-surface.c:1923)
==32723==    by 0x4044098: _cairo_gstate_paint (cairo-gstate.c:900)
==32723==    by 0x403C10B: cairo_paint (cairo.c:2052)
2009-07-21 07:45:23 +01:00
Søren Sandmann Pedersen
c7b84f8b04 Only apply the workaround if the clip region extends beyond the drawable.
This works because the X server always attempts to set a clip region
within the bounds of the drawable, and it only fails at it when it is
computing the wrong translation and therefore needs the workaround.
2009-07-21 01:27:46 -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
96340123eb Fix typo in sse2_combine_over_pixbuf_0565() 2009-07-21 01:26:37 -04:00
Adrian Bunk
767542cfb9 Fix NEON build for older ARM CPUs
The pld instruction used in the NEON assembler code is only available
for ARMv5e and >= ARMv6.

Set -mcpu=cortex-a8 when compiling the source file (similar to what is
already done for the SIMD build).
2009-07-20 20:16:32 -04:00
Søren Sandmann Pedersen
184cd80aa4 Some formatting changes to pixman-arm-neon.c 2009-07-20 19:56:46 -04:00
Siarhei Siamashka
5d2c527a22 ARM: Fixes for the inline assembly constraints in pixman_fill_neon
Some of the variables in the inline assembly arguments list are
actually modified by the assembly code, they are now marked
appropriately.
2009-07-20 19:41:59 -04:00
Siarhei Siamashka
c27a60f94c ARM: Workaround cs2007q3 compiler bug for NEON registers clobber list
128-bit registers "qX" are incorrectly handled in inline assembly
clobber list for codesourcery cs2007q3 gcc toolchain. Only the
first 64-bit half is saved and restored by gcc. Changing clobber
list to use only 64-bit register aliases can solve this problem.
For example, 128-bit register q0 is mapped to two 64-bit
registers d0 and d1, q1 is mapped to d2 and d3, etc.
2009-07-20 19:41:59 -04:00
Siarhei Siamashka
cb4a5fd18f ARM: Commented out the rest of buggy NEON optimizations
These functions have problems with invalid memory accesses and often
crash X server
2009-07-20 19:41:59 -04:00
Siarhei Siamashka
1aee6813ac ARM: Use Ian's variant of 'neon_composite_over_n_8_0565' function again
This patch effectively reverts the changes done by commit
8eeeca9932 which was causing
severe stability issues, and restores old variant of
'neon_composite_over_n_8_0565' function, which used to work
correctly.
2009-07-20 19:41:59 -04:00