Commit Graph

1147 Commits

Author SHA1 Message Date
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
Miha Vrhovnik
2356ba38fd Update Makefile.win32 to make it work again. 2009-07-20 19:30:59 -04:00
Benjamin Otte
d4b22bd993 Add a lot more sanity checks to region code
- Introduce a GOOD_RECT() macro that checks that a pixman_box_t is not
  empty or degenerate an use it.
- Use GOOD_RECT() instead of magic if statements for funtions that take
  x, y, width, height arguments
- Use GOOD_RECT() in _reset(). The checks in the previous code seemed to
  allow an empty box, but then created a broken region from it.
- Add GOOD(region) check at the end of _translate()
2009-07-21 00:53:09 +02:00
Benjamin Otte
a3ad8bb541 Handle degenerate case in pixman_init_extents()
Create an empty region instead
2009-07-20 23:45:18 +02:00
Søren Sandmann Pedersen
854ec2ea4d Replace // comments with /* */ comments in various places 2009-07-19 22:50:04 -04:00
Søren Sandmann Pedersen
54cad29dc5 Align the stack in _pixman_implementation_create_sse2()
When compiled without optimization, GCC will place various temporaries
on the stack. Since Firefox sometimes causes the stack to be aligned
to four bytes, this causes movdqa to generate faults.
2009-07-19 22:50:04 -04:00
M Joonas Pihlaja
6aa26296f5 Check whether the linker understands the hwcap file before using it.
If we're trying to use the GNU linker on Solaris we shouldn't use
our solaris-hwcap.mapfile since it doesn't grok the mapfile format.
2009-07-19 18:23:58 +03:00
Søren Sandmann Pedersen
934f4f4604 Move read and write functions to the bits_image_t struct.
Those fields were duplicated between image_common and bits_image_t
before.
2009-07-17 22:40:41 -04:00
Benjamin Otte
737d00063e Handle degenerate case in pixman_init_rect()
Create an empty region in that case.
2009-07-17 16:04:15 +02:00
Søren Sandmann Pedersen
e3a6df08a4 Add back check for need_workaround that got removed during reindenting 2009-07-17 06:43:35 -04:00
Søren Sandmann Pedersen
ecc54a7f02 Fix combine_src_ca() to fill out all of the destination line. 2009-07-16 10:38:22 -04:00
Søren Sandmann Pedersen
4df925bb28 Change composite test to use a rainbow gradient as source.
Also make the destination a yellow patch. This makes the output a bit
more comparable to the image in the PDF specification.
2009-07-16 09:45:32 -04:00
Søren Sandmann Pedersen
4f369faffa Various minor formatting changes 2009-07-16 09:45:32 -04:00
Søren Sandmann Pedersen
3d3baa3c5e Change name of macro from RGB16_TO_ENTRY to RGB15_TO_ENTRY 2009-07-16 09:45:32 -04:00
Benjamin Otte
12e829a8de Clarify color burn code - no semantical changes
- Improve documentation to be equal to Proposed ISO32000 Extension
- Simplify code in default case
2009-07-16 15:33:43 +02:00
Benjamin Otte
acf5738a82 Clarify color dodge code - no semantical changes
- Improve documentation to be equal to Proposed ISO32000 Extension
- Simplify code in default case
2009-07-16 15:33:27 +02:00
Benjamin Otte
3dafe926b2 Fix terms in comments describing the blend modes 2009-07-16 15:02:51 +02:00
Søren Sandmann Pedersen
90ac94b9cb Add -fno-strict-aliasing 2009-07-14 18:49:43 -04:00
Søren Sandmann Pedersen
268561a3c6 Post-release version bump 2009-07-13 22:22:20 -04:00
Søren Sandmann Pedersen
466cf2b445 Pre-release version bump 2009-07-13 22:00:52 -04:00
Søren Sandmann Pedersen
83f6e2eacf Reindent and rename identifiers in scaling-test.c 2009-07-13 19:58:04 -04:00
Søren Sandmann Pedersen
9a6ad34810 Reformat pixman.h 2009-07-13 19:56:25 -04:00
Søren Sandmann Pedersen
22f322fe24 Reindent and reformat pixman-private.h 2009-07-13 19:56:25 -04:00
Søren Sandmann Pedersen
b4d1960098 Reindent and reformat pixman-combine.h.template 2009-07-13 19:56:25 -04:00