profile/ivi/pixman.git
14 years agoARM: workaround for gcc bug in vshll_n_u8 intrinsic
Siarhei Siamashka [Fri, 28 Aug 2009 19:34:21 +0000 (22:34 +0300)]
ARM: workaround for gcc bug in vshll_n_u8 intrinsic

Some versions of gcc (cs2009q1, 4.4.1) incorrectly reject
shift operand having value >= 8, claiming that it is out of
range. So inline assembly is used as a workaround.

14 years agoEnable the x888_8_8888 sse2 fast path.
Søren Sandmann Pedersen [Tue, 2 Jun 2009 12:27:33 +0000 (08:27 -0400)]
Enable the x888_8_8888 sse2 fast path.

14 years agoAdd CPU detection for VC++ x64
Makoto Kato [Tue, 1 Sep 2009 01:59:05 +0000 (10:59 +0900)]
Add CPU detection for VC++ x64

VC++ x64 has no inline assembler and x64 mode supports SSE2.
So, it is unnecessary to call cpuid.

14 years agoChange names of add_8888_8_8 fast paths to add_n_8_8
Søren Sandmann Pedersen [Tue, 1 Sep 2009 12:23:23 +0000 (08:23 -0400)]
Change names of add_8888_8_8 fast paths to add_n_8_8

The source is solid in those.

14 years agoPost-release version bump
Søren Sandmann Pedersen [Fri, 28 Aug 2009 12:14:04 +0000 (08:14 -0400)]
Post-release version bump

14 years agoPre-release version bump
Søren Sandmann Pedersen [Fri, 28 Aug 2009 11:55:30 +0000 (07:55 -0400)]
Pre-release version bump

14 years ago_pixman_run_fast_path: typo
Chris Wilson [Fri, 28 Aug 2009 10:31:06 +0000 (06:31 -0400)]
_pixman_run_fast_path: typo

This is one example of a compiler warning that was lost amit the build
noise.

The error here is that in a list of required conditions we used ';'
instead of '&&' with the result of continuing to use the fast-path
even if we had a wide mask.

Another error is that it was testing src, not mask as it should.

14 years agoRemove spurious spaces in pixman-x64-mmx-emulation.h
Makoto Kato [Fri, 28 Aug 2009 08:09:15 +0000 (04:09 -0400)]
Remove spurious spaces in pixman-x64-mmx-emulation.h

14 years agoCheck if we have posix_memalign() in configure.ac. [23260, 23261]
Søren Sandmann Pedersen [Wed, 12 Aug 2009 18:08:58 +0000 (14:08 -0400)]
Check if we have posix_memalign() in configure.ac. [23260, 23261]

Fall back to malloc() in blitters-test.c if we don't.

14 years agoARM: a fix to pass blitters-test for 'neon_composite_over_n_8_0565'
Siarhei Siamashka [Wed, 12 Aug 2009 17:22:24 +0000 (20:22 +0300)]
ARM: a fix to pass blitters-test for 'neon_composite_over_n_8_0565'

Inline assembly for handling <8 pixels width did not pass blitters-test.
Fortunately gcc has no problems compiling alternative implementation
which is using RVCT style intrinsics, so it can be used instead.

14 years agoPost-release version bump
Søren Sandmann Pedersen [Tue, 11 Aug 2009 18:03:24 +0000 (14:03 -0400)]
Post-release version bump

14 years agoPre-release version-bump
Søren Sandmann Pedersen [Tue, 11 Aug 2009 17:56:16 +0000 (13:56 -0400)]
Pre-release version-bump

14 years agoMerge branch 'blitter-test'
Søren Sandmann Pedersen [Tue, 11 Aug 2009 06:04:40 +0000 (02:04 -0400)]
Merge branch 'blitter-test'

14 years agoFix x/y mixup in bits_image_fetch_pixel_convolution()
Søren Sandmann Pedersen [Tue, 11 Aug 2009 00:47:36 +0000 (20:47 -0400)]
Fix x/y mixup in bits_image_fetch_pixel_convolution()

Bug 23224, reported by Michel Dänzer.

14 years agoUpdate CRC value in blitters-test.
Søren Sandmann Pedersen [Fri, 7 Aug 2009 04:45:53 +0000 (00:45 -0400)]
Update CRC value in blitters-test.

At this point, the SIMD, SSE2, MMX and general implementations all
agree.

14 years agoVarious formatting fixes
Søren Sandmann Pedersen [Fri, 7 Aug 2009 04:25:56 +0000 (00:25 -0400)]
Various formatting fixes

14 years agoAdd the ability to print intermediate CRC values
Søren Sandmann Pedersen [Wed, 5 Aug 2009 20:28:10 +0000 (16:28 -0400)]
Add the ability to print intermediate CRC values

14 years agoReenable commented-out tests in blitter-test.
Søren Sandmann Pedersen [Wed, 5 Aug 2009 19:53:33 +0000 (15:53 -0400)]
Reenable commented-out tests in blitter-test.

The crashes and valgrind issues are all fixed at this point.

14 years agoOne more update to blitters-test - use aligned memory
Siarhei Siamashka [Sun, 2 Aug 2009 21:01:01 +0000 (00:01 +0300)]
One more update to blitters-test - use aligned memory
allocations in order in order to make reproducibility
of alignment sensitive bugs more deterministic
Also testing of masks is reenabled

14 years agoHACK: updated test to better cover new neon optimizations
Siarhei Siamashka [Fri, 31 Jul 2009 23:20:12 +0000 (02:20 +0300)]
HACK: updated test to better cover new neon optimizations

14 years agoTest program for stressing the use of different formats and operators
Siarhei Siamashka [Tue, 21 Jul 2009 22:29:51 +0000 (01:29 +0300)]
Test program for stressing the use of different formats and operators

The code and overall method is mostly based on scaling-test. This one
focuses on trying to stress as many different color formats and types
of composition operations as possible.

This is an initial implementation which may need more tuning. Also
not all color format and operator combinations are actually used.

When cpu specific optimizations are disabled, this test provides
identical deterministic results on x86, PPC and ARM.

Script blitters-test-bisect.rb now works in non-stop mode, until
it finds any problem. This allows to run it for example overnight
in order to test a lot more variants of pixman calls and increase
chances of detecting problems in pixman. Just like with scaling-test,
running blitters-test binary alone with no command line arguments
runs a small predefined number of tests and compares checksum
with a reference value for quick verification.

14 years agoDelete commented out code in pixman-vmx.c
Søren Sandmann Pedersen [Fri, 7 Aug 2009 16:00:07 +0000 (12:00 -0400)]
Delete commented out code in pixman-vmx.c

14 years agoMisc formatting fixes for pixman-vmx.c
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:53:50 +0000 (11:53 -0400)]
Misc formatting fixes for pixman-vmx.c

14 years agoIn vmx_combine_atop_reverse_ca() extract alpha after inversing
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:48:22 +0000 (11:48 -0400)]
In vmx_combine_atop_reverse_ca() extract alpha after inversing

14 years agoReally fix vmx_combine_over_reverse_ca()
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:46:09 +0000 (11:46 -0400)]
Really fix vmx_combine_over_reverse_ca()

The inverse destination alpha is just one component, not four.

14 years agoFix vmx_combine_out_reverse_ca()
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:40:42 +0000 (11:40 -0400)]
Fix vmx_combine_out_reverse_ca()

The source alpha is just one component, not four.

14 years agoFix vmx_over_reverse_ca()
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:38:03 +0000 (11:38 -0400)]
Fix vmx_over_reverse_ca()

Destination alpha must be extracted after inversing, otherwise we end
up with 0xFFs in the rgb channels.

14 years agoMultiply with the alpha of dest, not inverse alpha
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:35:20 +0000 (11:35 -0400)]
Multiply with the alpha of dest, not inverse alpha

14 years agoFix vmx_combine_vmx_atop_ca()
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:32:31 +0000 (11:32 -0400)]
Fix vmx_combine_vmx_atop_ca()

It didn't compute the mask correct before.

14 years agoFix vmx_combine_over_ca().
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:26:23 +0000 (11:26 -0400)]
Fix vmx_combine_over_ca().

In the non-vector code, the mask needs to be multiplied with source
alpha.

14 years agoIn vmx_combine_out_ca() multiply with the alpha of the negated vdest.
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:21:43 +0000 (11:21 -0400)]
In vmx_combine_out_ca() multiply with the alpha of the negated vdest.

14 years agoFix vmx_combine_out_ca()
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:16:31 +0000 (11:16 -0400)]
Fix vmx_combine_out_ca()

It should multiply with just the destination alpha channel, not all
four channels.

14 years agoDo the full four-component IN computation in vmx_combine_in_ca().
Søren Sandmann Pedersen [Fri, 7 Aug 2009 15:07:16 +0000 (11:07 -0400)]
Do the full four-component IN computation in vmx_combine_in_ca().

14 years agoFix bug in vmx_combine_xor_ca()
Søren Sandmann Pedersen [Fri, 7 Aug 2009 14:54:16 +0000 (10:54 -0400)]
Fix bug in vmx_combine_xor_ca()

The destination needs to be inverted before the alpha channel is
extracted; otherwise, the RGB channels of da will be 0xff.

14 years agoMake pix_multiply bit-exact
Søren Sandmann Pedersen [Fri, 7 Aug 2009 05:07:01 +0000 (01:07 -0400)]
Make pix_multiply bit-exact

14 years agoChange the SSE2 versions of pix_add_multiply() to produce bit-exact results.
Søren Sandmann Pedersen [Fri, 7 Aug 2009 03:50:32 +0000 (23:50 -0400)]
Change the SSE2 versions of pix_add_multiply() to produce bit-exact results.

14 years agoFix a couple of alpha==0 vs src==0 issues in pixman-sse2.c
Søren Sandmann Pedersen [Fri, 7 Aug 2009 03:52:11 +0000 (23:52 -0400)]
Fix a couple of alpha==0 vs src==0 issues in pixman-sse2.c

14 years agoRename mmx_composite_add_8888_8_8() to mmx_composite_add_n_8_8().
Søren Sandmann Pedersen [Fri, 7 Aug 2009 03:05:36 +0000 (23:05 -0400)]
Rename mmx_composite_add_8888_8_8() to mmx_composite_add_n_8_8().

14 years agoFix a couple more alpha==0 vs src==0 bugs in pixman-mmx.c
Søren Sandmann Pedersen [Fri, 7 Aug 2009 02:46:50 +0000 (22:46 -0400)]
Fix a couple more alpha==0 vs src==0 bugs in pixman-mmx.c

14 years agoMake pix_add_mul() in pixman-mmx.c produce exact results.
Søren Sandmann Pedersen [Fri, 7 Aug 2009 02:42:25 +0000 (22:42 -0400)]
Make pix_add_mul() in pixman-mmx.c produce exact results.

Previously this routine would compute (x * a + y * b) / 255. Now it
computes (x * a) / 255 + (y * b) / 255, so that the results are
bitwise equivalent to the non-mmx versions.

14 years agoRewrite the two-component arithmetic macros.
Søren Sandmann Pedersen [Fri, 7 Aug 2009 00:29:44 +0000 (20:29 -0400)]
Rewrite the two-component arithmetic macros.

Previously they were not bit-for-bit equivalent to the one-component
versions. The new code is also simpler and easier to read because it
factors out some common sub-macros.

The x * a + y * b macro now only uses four multiplications - the
previous version used eight.

14 years agoFix a bunch of srca == 0 checks that should be src == 0 in pixman-mmx.c
Søren Sandmann Pedersen [Fri, 7 Aug 2009 00:41:04 +0000 (20:41 -0400)]
Fix a bunch of srca == 0 checks that should be src == 0 in pixman-mmx.c

14 years agoDon't run fast paths if the format requires wide compositing.
Søren Sandmann Pedersen [Thu, 6 Aug 2009 01:24:50 +0000 (21:24 -0400)]
Don't run fast paths if the format requires wide compositing.

This could happen because the wide formats would still be considered
solid if the image was 1x1 and repeating.

14 years agoFix bug in combine_mask_alpha_ca()
Søren Sandmann Pedersen [Thu, 6 Aug 2009 01:16:14 +0000 (21:16 -0400)]
Fix bug in combine_mask_alpha_ca()

If the mask was 0xffffffff, the source would end up being shifted
twice by A_SHIFT.

14 years agoFix another case of changing the solid source.
Søren Sandmann Pedersen [Thu, 6 Aug 2009 00:40:36 +0000 (20:40 -0400)]
Fix another case of changing the solid source.

This time in fast_path_composite_n_8888_8888().

14 years agoFix incorrect optimization in combine_over_ca().
Søren Sandmann Pedersen [Thu, 6 Aug 2009 00:31:41 +0000 (20:31 -0400)]
Fix incorrect optimization in combine_over_ca().

Previously the code assumed that an alpha of 0 meant that no change
would take place. This is incorrect because an alpha of 0 can happen
as the result of the source having alpha=0, but rgb != 0.

14 years agoDon't change the constant source in fast_composite_over_n_8888_0565.
Søren Sandmann Pedersen [Wed, 5 Aug 2009 22:18:37 +0000 (18:18 -0400)]
Don't change the constant source in fast_composite_over_n_8888_0565.

14 years agoFix bugs in combine_over_reverse_ca().
Søren Sandmann Pedersen [Wed, 5 Aug 2009 20:17:52 +0000 (16:17 -0400)]
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.

14 years agoAdd a dirty bit to the image struct, and validate before using the image.
Søren Sandmann Pedersen [Fri, 31 Jul 2009 21:27:38 +0000 (17:27 -0400)]
Add a dirty bit to the image struct, and validate before using the image.

This cuts down the number of property_changed calls significantly.

14 years agoAdd sse2 version of add_n_8888_8888()
Søren Sandmann Pedersen [Fri, 31 Jul 2009 14:39:41 +0000 (10:39 -0400)]
Add sse2 version of add_n_8888_8888()

14 years agoAdd a fast path for the add_n_8888_8888() operation.
Søren Sandmann Pedersen [Fri, 31 Jul 2009 14:26:10 +0000 (10:26 -0400)]
Add a fast path for the add_n_8888_8888() operation.

It shows up on gnome-terminal traces.

14 years agoMove bounds checks for REPEAT_NONE to get_pixel()
Søren Sandmann Pedersen [Fri, 31 Jul 2009 11:29:31 +0000 (07:29 -0400)]
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

14 years agoRemove leftover 0xffffffff in repeat()
Søren Sandmann Pedersen [Thu, 30 Jul 2009 14:51:38 +0000 (10:51 -0400)]
Remove leftover 0xffffffff in repeat()

14 years agoRemove unused function
Søren Sandmann Pedersen [Thu, 30 Jul 2009 14:45:18 +0000 (10:45 -0400)]
Remove unused function

14 years agoMisc formatting
Søren Sandmann Pedersen [Thu, 30 Jul 2009 14:03:44 +0000 (10:03 -0400)]
Misc formatting

14 years agoChange all the fetch_pixels() functions to only fetch one pixel.
Søren Sandmann Pedersen [Thu, 30 Jul 2009 13:58:12 +0000 (09:58 -0400)]
Change all the fetch_pixels() functions to only fetch one pixel.

14 years agoAdd fetch_pixel_raw_32 and fetch_pixel_32 virtual functions.
Søren Sandmann Pedersen [Tue, 28 Jul 2009 13:43:12 +0000 (09:43 -0400)]
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().

14 years agoVarious renamings and clean-ups
Søren Sandmann Pedersen [Tue, 28 Jul 2009 13:12:51 +0000 (09:12 -0400)]
Various renamings and clean-ups

14 years agoChange bits_image_fetch_alpha_pixels() to fetch just one pixel.
Søren Sandmann Pedersen [Tue, 28 Jul 2009 12:58:41 +0000 (08:58 -0400)]
Change bits_image_fetch_alpha_pixels() to fetch just one pixel.

14 years agoChange bits_image_fetch_pixels_convolution() to fetch just one pixel.
Søren Sandmann Pedersen [Tue, 28 Jul 2009 12:44:40 +0000 (08:44 -0400)]
Change bits_image_fetch_pixels_convolution() to fetch just one pixel.

14 years agoChange bits_image_fetch_bilinear_pixels() to fetch one pixel at a time.
Søren Sandmann Pedersen [Tue, 28 Jul 2009 12:33:28 +0000 (08:33 -0400)]
Change bits_image_fetch_bilinear_pixels() to fetch one pixel at a time.

14 years agoMake the repeat routine work on only one coordinate at a time.
Søren Sandmann Pedersen [Tue, 28 Jul 2009 12:03:44 +0000 (08:03 -0400)]
Make the repeat routine work on only one coordinate at a time.

14 years agoMake bits_image_fetch_nearest() return one pixel.
Søren Sandmann Pedersen [Tue, 28 Jul 2009 11:55:27 +0000 (07:55 -0400)]
Make bits_image_fetch_nearest() return one pixel.

Previously it would work on a buffer of coordinates.

14 years agoChange bits_image_fetch_transformed() to work one pixel at a time.
Søren Sandmann Pedersen [Tue, 28 Jul 2009 11:42:34 +0000 (07:42 -0400)]
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.

14 years agoOnly define PIXMAN_TIMERS if timers are actually enabled [bug 23169]
Søren Sandmann Pedersen [Fri, 7 Aug 2009 04:11:20 +0000 (00:11 -0400)]
Only define PIXMAN_TIMERS if timers are actually enabled [bug 23169]

15 years agoVarious updates to the CODING_STYLE document
Søren Sandmann Pedersen [Tue, 28 Jul 2009 13:58:52 +0000 (09:58 -0400)]
Various updates to the CODING_STYLE document

15 years agoAdd a CODING_STYLE document based on the one from cairo.
Søren Sandmann Pedersen [Tue, 28 Jul 2009 08:05:26 +0000 (04:05 -0400)]
Add a CODING_STYLE document based on the one from cairo.

15 years agoRemove a couple of unused variables
Søren Sandmann Pedersen [Wed, 22 Jul 2009 08:51:08 +0000 (04:51 -0400)]
Remove a couple of unused variables

15 years agoRename source_pict_class_t to source_image_class_t
Søren Sandmann Pedersen [Wed, 22 Jul 2009 08:32:07 +0000 (04:32 -0400)]
Rename source_pict_class_t to source_image_class_t

15 years agoReplace a bunch of 'pict's with 'image'
Søren Sandmann Pedersen [Wed, 22 Jul 2009 08:28:08 +0000 (04:28 -0400)]
Replace a bunch of 'pict's with 'image'

15 years agoExplain how we can simplify the radial gradient computation
Chris Wilson [Fri, 24 Jul 2009 08:36:08 +0000 (09:36 +0100)]
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.

15 years agoFix inversion of radial gradients when r2 > r1
Chris Wilson [Thu, 23 Jul 2009 18:08:40 +0000 (19:08 +0100)]
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.

15 years agoDon't warn for empty rectangles, only degenerate ones
Benjamin Otte [Thu, 23 Jul 2009 07:54:49 +0000 (09:54 +0200)]
Don't warn for empty rectangles, only degenerate ones

15 years agoLog errors for invalid rectangles passed to region code
Benjamin Otte [Tue, 21 Jul 2009 13:00:52 +0000 (15:00 +0200)]
Log errors for invalid rectangles passed to region code

15 years agoSimplify code that logs errors
Benjamin Otte [Tue, 21 Jul 2009 12:57:59 +0000 (14:57 +0200)]
Simplify code that logs errors

15 years agoMake the text when reporting a broken region more useful
Benjamin Otte [Tue, 21 Jul 2009 12:50:30 +0000 (14:50 +0200)]
Make the text when reporting a broken region more useful

15 years agoPost-release version bump
Søren Sandmann Pedersen [Tue, 21 Jul 2009 11:24:40 +0000 (07:24 -0400)]
Post-release version bump

15 years agoPre-release version bump
Søren Sandmann Pedersen [Tue, 21 Jul 2009 11:20:57 +0000 (07:20 -0400)]
Pre-release version bump

15 years agoDon't assert when malformed regions are detected.
Søren Sandmann Pedersen [Tue, 21 Jul 2009 11:01:10 +0000 (07:01 -0400)]
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.

15 years agoFix another search and replace issue
Søren Sandmann Pedersen [Tue, 21 Jul 2009 08:23:56 +0000 (04:23 -0400)]
Fix another search and replace issue

15 years agoFix search-and-replace issue pointed out by Koen Kooi.
Søren Sandmann Pedersen [Tue, 21 Jul 2009 08:18:35 +0000 (04:18 -0400)]
Fix search-and-replace issue pointed out by Koen Kooi.

15 years agoAdd implementation of MMX __m64 functions for MSVC x64.
George Yohng [Tue, 21 Jul 2009 07:43:42 +0000 (03:43 -0400)]
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.

15 years agoFix read of BITS members from a solid image.
Chris Wilson [Mon, 20 Jul 2009 13:07:18 +0000 (14:07 +0100)]
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)

15 years agoOnly apply the workaround if the clip region extends beyond the drawable.
Søren Sandmann Pedersen [Tue, 21 Jul 2009 04:17:15 +0000 (00:17 -0400)]
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.

15 years agoRework the workaround for bogus X server images.
Søren Sandmann Pedersen [Tue, 21 Jul 2009 03:46:06 +0000 (23:46 -0400)]
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.

15 years agoAdd test case for bug 22844.
Søren Sandmann Pedersen [Tue, 21 Jul 2009 02:45:47 +0000 (22:45 -0400)]
Add test case for bug 22844.

15 years agoFix typo in sse2_combine_over_pixbuf_0565()
Søren Sandmann Pedersen [Tue, 21 Jul 2009 05:24:43 +0000 (01:24 -0400)]
Fix typo in sse2_combine_over_pixbuf_0565()

15 years agoFix NEON build for older ARM CPUs
Adrian Bunk [Tue, 21 Jul 2009 00:16:32 +0000 (20:16 -0400)]
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).

15 years agoSome formatting changes to pixman-arm-neon.c
Søren Sandmann Pedersen [Mon, 20 Jul 2009 23:56:46 +0000 (19:56 -0400)]
Some formatting changes to pixman-arm-neon.c

15 years agoARM: Fixes for the inline assembly constraints in pixman_fill_neon
Siarhei Siamashka [Fri, 17 Jul 2009 10:03:21 +0000 (13:03 +0300)]
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.

15 years agoARM: Workaround cs2007q3 compiler bug for NEON registers clobber list
Siarhei Siamashka [Fri, 17 Jul 2009 09:54:44 +0000 (12:54 +0300)]
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.

15 years agoARM: Commented out the rest of buggy NEON optimizations
Siarhei Siamashka [Thu, 16 Jul 2009 21:11:14 +0000 (00:11 +0300)]
ARM: Commented out the rest of buggy NEON optimizations

These functions have problems with invalid memory accesses and often
crash X server

15 years agoARM: Use Ian's variant of 'neon_composite_over_n_8_0565' function again
Siarhei Siamashka [Thu, 16 Jul 2009 21:08:42 +0000 (00:08 +0300)]
ARM: Use Ian's variant of 'neon_composite_over_n_8_0565' function again

This patch effectively reverts the changes done by commit
8eeeca993252edc39da9c5c57545b81215fafc81 which was causing
severe stability issues, and restores old variant of
'neon_composite_over_n_8_0565' function, which used to work
correctly.

15 years agoUpdate Makefile.win32 to make it work again.
Miha Vrhovnik [Mon, 20 Jul 2009 23:30:59 +0000 (19:30 -0400)]
Update Makefile.win32 to make it work again.

15 years agoAdd a lot more sanity checks to region code
Benjamin Otte [Mon, 20 Jul 2009 22:49:40 +0000 (00:49 +0200)]
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()

15 years agoHandle degenerate case in pixman_init_extents()
Benjamin Otte [Mon, 20 Jul 2009 21:38:36 +0000 (23:38 +0200)]
Handle degenerate case in pixman_init_extents()

Create an empty region instead

15 years agoReplace // comments with /* */ comments in various places
Søren Sandmann Pedersen [Sun, 19 Jul 2009 16:29:42 +0000 (12:29 -0400)]
Replace // comments with /* */ comments in various places

15 years agoAlign the stack in _pixman_implementation_create_sse2()
Søren Sandmann Pedersen [Sat, 18 Jul 2009 21:59:43 +0000 (17:59 -0400)]
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.

15 years agoCheck whether the linker understands the hwcap file before using it.
M Joonas Pihlaja [Sun, 19 Jul 2009 15:20:53 +0000 (18:20 +0300)]
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.

15 years agoMove read and write functions to the bits_image_t struct.
Søren Sandmann Pedersen [Sat, 18 Jul 2009 02:40:41 +0000 (22:40 -0400)]
Move read and write functions to the bits_image_t struct.

Those fields were duplicated between image_common and bits_image_t
before.