profile/ivi/pixman.git
14 years agoMove region computation out of the loop in do_composite()
Søren Sandmann Pedersen [Tue, 15 Sep 2009 05:16:40 +0000 (01:16 -0400)]
Move region computation out of the loop in do_composite()

We only need to compute the composite region once, not on every
iteration.

14 years agoMove get_image_info() out of the loop in do_composite
Søren Sandmann Pedersen [Tue, 15 Sep 2009 05:14:41 +0000 (01:14 -0400)]
Move get_image_info() out of the loop in do_composite

The computation of image formats and flags is invariant to the loop,
so it can all be moved out.

14 years agoManually inline _pixman_run_fast_path()
Søren Sandmann Pedersen [Tue, 15 Sep 2009 05:13:36 +0000 (01:13 -0400)]
Manually inline _pixman_run_fast_path()

Move all of the code into do_composite().

14 years agoMove compositing functionality from pixman-utils.c into pixman.c
Søren Sandmann Pedersen [Tue, 15 Sep 2009 05:11:04 +0000 (01:11 -0400)]
Move compositing functionality from pixman-utils.c into pixman.c

_pixman_run_fast_path() and pixman_compute_composite_region() are both
moved to pixman-image, since at this point that's the only place they
are being called from.

14 years agoMove compositing to its own function, do_composite()
Søren Sandmann Pedersen [Sat, 7 Nov 2009 20:13:03 +0000 (15:13 -0500)]
Move compositing to its own function, do_composite()

14 years agoOptimize for the common case wrt. the workaround.
Søren Sandmann Pedersen [Tue, 15 Sep 2009 04:58:51 +0000 (00:58 -0400)]
Optimize for the common case wrt. the workaround.

In the common case no images need the workaround, so we check for that
first, and only if an image does need a workaround do we check which
one of the images actually need it.

14 years agoEliminate all the composite methods.
Søren Sandmann Pedersen [Tue, 15 Sep 2009 04:48:12 +0000 (00:48 -0400)]
Eliminate all the composite methods.

They are no longer necessary because we will just walk the fast path
tables, and the general composite path is treated as another fast
path.

This unfortunately means that sse2_composite() can no longer be
responsible for realigning the stack to 16 bytes, so we have to move
that to pixman_image_composite().

14 years agoDelete unused _pixman_walk_composite_region() function
Søren Sandmann Pedersen [Tue, 15 Sep 2009 04:23:11 +0000 (00:23 -0400)]
Delete unused _pixman_walk_composite_region() function

14 years agoDon't call _pixman_implementation_composite() anymore.
Søren Sandmann Pedersen [Sat, 7 Nov 2009 20:28:57 +0000 (15:28 -0500)]
Don't call _pixman_implementation_composite() anymore.

Instead just call _pixman_run_fast_path(). Since we view
general_composite() as a fast path now, we know that it will find
*some* compositing routine.

14 years agoDelete unused sources_cover() function
Søren Sandmann Pedersen [Tue, 15 Sep 2009 03:58:40 +0000 (23:58 -0400)]
Delete unused sources_cover() function

14 years agoStore a pointer to the array of fast paths in the implementation struct.
Søren Sandmann Pedersen [Tue, 15 Sep 2009 03:47:39 +0000 (23:47 -0400)]
Store a pointer to the array of fast paths in the implementation struct.

Also add an empty fast path table to the vmx implementation, so that
we can assume sure the pointer is never NULL.

14 years agoMake fast_composite_scaled_nearest() another fast path.
Søren Sandmann Pedersen [Tue, 15 Sep 2009 04:20:22 +0000 (00:20 -0400)]
Make fast_composite_scaled_nearest() another fast path.

This requires another couple of flags

     FAST_PATH_SCALE_TRANSFORM
     FAST_PATH_NEAREST_FILTER

14 years agoMake general_composite_rect() just another fast path.
Søren Sandmann Pedersen [Sun, 13 Sep 2009 09:29:48 +0000 (05:29 -0400)]
Make general_composite_rect() just another fast path.

We introduce a new PIXMAN_OP_any fake operator and a PIXMAN_any fake
format that match anything. Then general_composite_rect() can be used
as another fast path.

Because general_composite_rect() does not require the sources to cover
the clip region, we add a new flag FAST_PATH_COVERS_CLIP which is part
of the set of standard flags for fast paths.

Because this flag cannot be computed until after the clip region is
available, we have to call pixman_compute_composite_region32() before
checking for fast paths. This will resolve itself when we get to the
point where _pixman_run_fast_path() is only called once per composite
operation.

14 years agoPost-release version bump
Søren Sandmann Pedersen [Sat, 13 Feb 2010 23:23:34 +0000 (18:23 -0500)]
Post-release version bump

14 years agoPre-release version bump
Søren Sandmann Pedersen [Sat, 13 Feb 2010 23:12:32 +0000 (18:12 -0500)]
Pre-release version bump

14 years agoOnce unrolled version of fast_path_composite_nearest_scaled()
Søren Sandmann Pedersen [Sun, 31 May 2009 19:06:33 +0000 (15:06 -0400)]
Once unrolled version of fast_path_composite_nearest_scaled()

Separate out the fetching and combining code in two inline
functions. Then do two pixels per iteration.

14 years agoGeneralize and optimize fast_composite_src_scaled_nearest()
Søren Sandmann Pedersen [Sat, 30 May 2009 06:50:38 +0000 (02:50 -0400)]
Generalize and optimize fast_composite_src_scaled_nearest()

- Make it work for PIXMAN_OP_OVER

- Split repeat computation for x and y, and only the x part in the
  inner loop.

- Move stride multiplication outside of inner loop

14 years agoMerge branch 'bitmasks'
Søren Sandmann Pedersen [Sat, 13 Feb 2010 17:26:09 +0000 (12:26 -0500)]
Merge branch 'bitmasks'

14 years agoMakefile.am: Remove 'check' from release-check
Søren Sandmann Pedersen [Sat, 13 Feb 2010 16:18:13 +0000 (11:18 -0500)]
Makefile.am: Remove 'check' from release-check

It's already included in distcheck.

14 years agoTurn off asserts in development snapshots (bug 26314).
Søren Sandmann Pedersen [Sat, 13 Feb 2010 14:40:33 +0000 (09:40 -0500)]
Turn off asserts in development snapshots (bug 26314).

There is not much real benefit in having asserts turned on in
snapshots because it doesn't lead to any new bug reports, just to
people not installing development snapshots since they case X server
crashes. So just turn them off.

While we are at it, limit the number of messages to stderr to 5
instead of 50.

14 years agoARM: Remove any use of environment variables for cpu features detection
Siarhei Siamashka [Sun, 7 Feb 2010 05:33:52 +0000 (07:33 +0200)]
ARM: Remove any use of environment variables for cpu features detection

Old code assumed that all ARMv7 processors support NEON instructions
unless overrided by environment variable ARM_TRUST_HWCAP. This causes
X server to die with SIGILL if NEON support is disabled in the kernel
configuration. Additionally, ARMv7 processors lacking NEON unit are
going to become available eventually.

The problem was reported by user bearsh at irc.freenode.net #gentoo-embedded

14 years agoAdd pixman_image_get_destroy_data()
Alexander Larsson [Tue, 9 Feb 2010 14:57:18 +0000 (15:57 +0100)]
Add pixman_image_get_destroy_data()

This way you can get back user data that was set using
pixman_image_set_destroy_function().

14 years agoAdd extern "C" guards for c++
Alexander Larsson [Tue, 9 Feb 2010 12:22:38 +0000 (13:22 +0100)]
Add extern "C" guards for c++

14 years agoMove checks for src/mask repeat right before walking the region.
Søren Sandmann Pedersen [Sun, 13 Sep 2009 08:28:20 +0000 (04:28 -0400)]
Move checks for src/mask repeat right before walking the region.

Also add a couple of additional checks to the src/mask repeat check.

14 years agoCompute src, mask, dest flags and base fast path decisions on them.
Søren Sandmann Pedersen [Sun, 13 Sep 2009 07:43:16 +0000 (03:43 -0400)]
Compute src, mask, dest flags and base fast path decisions on them.

This makes sets the stage for caching the information by image instead
of computing it on each composite invocation.

This patch also computes format codes for images such as PIXMAN_solid,
so that we can no longer end up in the situation that a fast path is
selected for a 1x1 solid image, when that fast path doesn't actually
understand repeating.

14 years agoAdd src_, mask_, and dest_flags fields to fast path arrays
Søren Sandmann Pedersen [Sun, 13 Sep 2009 06:34:32 +0000 (02:34 -0400)]
Add src_, mask_, and dest_flags fields to fast path arrays

Update all the fast path tables to match using a new
PIXMAN_STD_FAST_PATH macro.

For now, use 0 for the flags fields.

14 years agoMove calls to source_is_fastpathable() into get_source_format()
Søren Sandmann Pedersen [Sat, 12 Sep 2009 09:26:50 +0000 (05:26 -0400)]
Move calls to source_is_fastpathable() into get_source_format()

14 years agoFold get_fast_path() into _pixman_run_fast_path()
Søren Sandmann Pedersen [Sat, 12 Sep 2009 09:09:53 +0000 (05:09 -0400)]
Fold get_fast_path() into _pixman_run_fast_path()

Also factor out the source format code computation to its own
function.

14 years agoConsolidate the source and mask sanity checks in a function
Søren Sandmann Pedersen [Sat, 12 Sep 2009 08:30:22 +0000 (04:30 -0400)]
Consolidate the source and mask sanity checks in a function

14 years agoMove pixbuf checks after src_format and mask_format have been computed.
Søren Sandmann Pedersen [Sat, 12 Sep 2009 08:10:30 +0000 (04:10 -0400)]
Move pixbuf checks after src_format and mask_format have been computed.

14 years agoMove the sanity checks for src, mask and destination into get_fast_path()
Søren Sandmann Pedersen [Sat, 12 Sep 2009 08:03:25 +0000 (04:03 -0400)]
Move the sanity checks for src, mask and destination into get_fast_path()

14 years agoTurn some uint16_t variables to int32_t in the fast paths.
Søren Sandmann Pedersen [Wed, 27 Jan 2010 12:11:11 +0000 (07:11 -0500)]
Turn some uint16_t variables to int32_t in the fast paths.

This is necessary now that we have a 32 bit version of
pixman_image_composite().

14 years agoImplement get_scanline_64() correctly for solid fill images.
Søren Sandmann Pedersen [Thu, 21 Jan 2010 18:43:53 +0000 (13:43 -0500)]
Implement get_scanline_64() correctly for solid fill images.

Previously they would be evaluated at 8 bits and then expanded.

14 years agoMake pixman_image_fill_rectangles() call pixman_image_fill_boxes()
Benjamin Otte [Tue, 26 Jan 2010 18:37:34 +0000 (19:37 +0100)]
Make pixman_image_fill_rectangles() call pixman_image_fill_boxes()

Avoids duplication of code

14 years agoAdd pixman_image_fill_boxes() API
Benjamin Otte [Tue, 26 Jan 2010 18:03:38 +0000 (19:03 +0100)]
Add pixman_image_fill_boxes() API

It's basically the 32bit version of pixman_image_fill_rectangles(), just
with a saner data type.

14 years agoAdd pixman_image_composite32()
Benjamin Otte [Tue, 26 Jan 2010 17:52:27 +0000 (18:52 +0100)]
Add pixman_image_composite32()

This is equal to pixman_image_composite(), just with 32bit parameters.
pixman_image_composite() now just calls pixman_image_composite32()

14 years agoMake region argument to pixman_region(32)_init_rects() const
Benjamin Otte [Tue, 26 Jan 2010 18:09:56 +0000 (19:09 +0100)]
Make region argument to pixman_region(32)_init_rects() const

No indenting of the header to keep git blame working

14 years agoFix typo
Benjamin Otte [Tue, 26 Jan 2010 18:08:29 +0000 (19:08 +0100)]
Fix typo

14 years agoFix some warnings
Søren Sandmann Pedersen [Tue, 19 Jan 2010 19:23:57 +0000 (14:23 -0500)]
Fix some warnings

14 years agoPost-release version bump
Søren Sandmann Pedersen [Mon, 18 Jan 2010 00:34:27 +0000 (19:34 -0500)]
Post-release version bump

14 years agoPre-release version bump
Søren Sandmann Pedersen [Sun, 17 Jan 2010 23:56:11 +0000 (18:56 -0500)]
Pre-release version bump

14 years agobits: Print an error if someone tries to create an image with bpp < depth
Søren Sandmann Pedersen [Sun, 17 Jan 2010 21:45:23 +0000 (16:45 -0500)]
bits: Print an error if someone tries to create an image with bpp < depth

Something in the X server apparently does this.

14 years agoWhen fetching from an alpha map, replace the alpha channel of the image
Søren Sandmann Pedersen [Sat, 16 Jan 2010 15:31:22 +0000 (10:31 -0500)]
When fetching from an alpha map, replace the alpha channel of the image

Previously it would be multiplied onto the image pixel, but the Render
specification is pretty clear that the alpha map should be used
*instead* of any alpha channel within the image.

This makes the assumption that the pixels in the image are already
premultiplied with the alpha channel from the alpha map. If we don't
make this assumption and the image has an alpha channel of its own, we
would have to first unpremultiply that pixel, and then premultiply the
alpha value onto the color channels, and then replace the alpha
channel.

14 years agopixman_image_validate() needs to also validate the alpha map.
Søren Sandmann Pedersen [Sat, 16 Jan 2010 15:09:25 +0000 (10:09 -0500)]
pixman_image_validate() needs to also validate the alpha map.

This is the other half of bug 25950.

14 years agoWhen fetching from an alpha map, use the alpha map's fetch function.
Søren Sandmann Pedersen [Sat, 16 Jan 2010 15:07:48 +0000 (10:07 -0500)]
When fetching from an alpha map, use the alpha map's fetch function.

Don't use the one from the image. This is the first half of bug 25950.

14 years agotest: Add new alphamap test program.
Søren Sandmann Pedersen [Sat, 16 Jan 2010 14:48:45 +0000 (09:48 -0500)]
test: Add new alphamap test program.

This program demonstrates three bugs relating to alpha maps:

- When fetching from an alpha map into 32 bit intermediates, we use
  the fetcher from the image, and not the one from the alpha map.

- For 64 bit intermediates we call fetch_pixel_generic_lossy_32()
  which then calls fetch_pixel_raw_64, which is NULL because alpha
  images are never validated.

- The alpha map should be used *in place* of any existing alpha
  channel, but we are actually multiplying it onto the image.

14 years agofetch-test: Fix spelling error (pallete -> palette)
Søren Sandmann Pedersen [Sat, 16 Jan 2010 12:40:07 +0000 (07:40 -0500)]
fetch-test: Fix spelling error (pallete -> palette)

14 years agoUpdate Sun license notices to current X.Org standard form
Alan Coopersmith [Thu, 14 Jan 2010 17:42:34 +0000 (09:42 -0800)]
Update Sun license notices to current X.Org standard form

Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>
14 years agofetch-test: Various formatting fixes
Søren Sandmann Pedersen [Sun, 10 Jan 2010 14:15:24 +0000 (09:15 -0500)]
fetch-test: Various formatting fixes

14 years agoInterpret the angle of a conical gradient in degrees.
Pierre-Loup A. Griffais [Tue, 5 Jan 2010 23:26:07 +0000 (01:26 +0200)]
Interpret the angle of a conical gradient in degrees.

The conical gradient angle's fixed point degrees to
radians conversion code is missing a factor of pi.

14 years agoregion: Enable or disable fatal errors and selfchecks based on version number
Søren Sandmann Pedersen [Fri, 11 Dec 2009 16:14:19 +0000 (11:14 -0500)]
region: Enable or disable fatal errors and selfchecks based on version number

There is a couple of bugs in bugzilla where bugs in the X server
triggered asserts in the pixman region code. It is probably better to
let the X server survive this. (In fact, I thought I had disabled them
for 0.16.0, but apparently not).

The patch below uses these rules:

    - In _stable_ pixman releases, assertions and selfchecks are turned
      off. Assertions, so that the X server doesn't die. Selfchecks,
      for performance reasons.

    - In _unstable_ pixman releases, both assertions and selfcheck are
      turned on. These releases are what get added to development
      distributions such as rawhide, so we want as much self-checking
      as possible.

    - In _random git checkouts_, assertions are enabled, so that bugs
      are caught, but selfchecks are disabled so that you can use them
      for performance work without having to fiddle with turning
      selfchecks off.

14 years agoSome minor formatting fixes.
Søren Sandmann Pedersen [Sat, 12 Sep 2009 07:27:44 +0000 (03:27 -0400)]
Some minor formatting fixes.

14 years agoarm-simd: Whitespace fixes
Søren Sandmann Pedersen [Wed, 16 Dec 2009 22:54:41 +0000 (17:54 -0500)]
arm-simd: Whitespace fixes

14 years agommx: Eliminate trailing whitespace.
Søren Sandmann Pedersen [Wed, 16 Dec 2009 22:49:44 +0000 (17:49 -0500)]
mmx: Eliminate trailing whitespace.

14 years agoAdd 'check' to release-check make target
Søren Sandmann Pedersen [Wed, 16 Dec 2009 20:23:50 +0000 (15:23 -0500)]
Add 'check' to release-check make target

14 years agoReorder tests so that they fastest ones run first.
Søren Sandmann Pedersen [Wed, 16 Dec 2009 20:15:17 +0000 (15:15 -0500)]
Reorder tests so that they fastest ones run first.

14 years agoBuild tests and run non-GTK+ ones on `make check`
Marvin Schmidt [Sun, 15 Nov 2009 15:04:09 +0000 (16:04 +0100)]
Build tests and run non-GTK+ ones on `make check`

Setting TESTS will run the tests on `make check`

Bug 25131

14 years agoARM: added 'neon_combine_add_u' function
Siarhei Siamashka [Wed, 9 Dec 2009 22:25:58 +0000 (00:25 +0200)]
ARM: added 'neon_combine_add_u' function

14 years agoARM: added 'neon_combine_over_u' function
Siarhei Siamashka [Wed, 9 Dec 2009 22:22:12 +0000 (00:22 +0200)]
ARM: added 'neon_combine_over_u' function

14 years agoARM: macro template for single scanline compositing functions
Siarhei Siamashka [Wed, 9 Dec 2009 21:49:04 +0000 (23:49 +0200)]
ARM: macro template for single scanline compositing functions

Existing template already supports 2D images processing,
but pixman also needs some NEON optimized functions for
improving performance when compositing is decoupled
into "fetch -> process -> store" stages and done via
temporary scanline buffer. That's why a new simplified
template which deals only with the generation of single
scanline processing functions is handy.

14 years agoUse canonical pixman license notice for recently added ARM NEON assembly files
Siarhei Siamashka [Mon, 14 Dec 2009 17:14:36 +0000 (19:14 +0200)]
Use canonical pixman license notice for recently added ARM NEON assembly files

14 years agoARM: added 'neon_composite_src_pixbuf_8888' fast path
Siarhei Siamashka [Fri, 6 Nov 2009 00:25:47 +0000 (02:25 +0200)]
ARM: added 'neon_composite_src_pixbuf_8888' fast path

This is ARM NEON optimized conversion of native RGBA format used by
GTK/GDK into native 32bpp RGBA format used by cairo/pixman.

14 years agoARM: added 'neon_composite_src_0888_0565_rev' fast path
Siarhei Siamashka [Thu, 5 Nov 2009 18:27:38 +0000 (20:27 +0200)]
ARM: added 'neon_composite_src_0888_0565_rev' fast path

This is ARM NEON optimized conversion of native RGB format used by
GTK/GDK into r5g6b5 format.

14 years agoARM: added 'neon_src_0888_8888_rev' fast path
Siarhei Siamashka [Thu, 5 Nov 2009 17:43:09 +0000 (19:43 +0200)]
ARM: added 'neon_src_0888_8888_rev' fast path

This is ARM NEON optimized conversion of native RGB format used by
GTK/GDK into native 32bpp RGB format used by cairo/pixman.

14 years agoARM: added 'neon_composite_over_n_8888' fast path
Siarhei Siamashka [Wed, 9 Dec 2009 09:29:13 +0000 (11:29 +0200)]
ARM: added 'neon_composite_over_n_8888' fast path

14 years agoARM: added 'neon_composite_over_n_0565' fast path
Siarhei Siamashka [Wed, 9 Dec 2009 09:02:04 +0000 (11:02 +0200)]
ARM: added 'neon_composite_over_n_0565' fast path

14 years agoARM: added 'neon_composite_src_0565_8888' fast path
Siarhei Siamashka [Wed, 9 Dec 2009 08:33:01 +0000 (10:33 +0200)]
ARM: added 'neon_composite_src_0565_8888' fast path

14 years agoARM: added 'neon_composite_add_8888_8888_8888' fast path
Siarhei Siamashka [Tue, 8 Dec 2009 13:04:41 +0000 (15:04 +0200)]
ARM: added 'neon_composite_add_8888_8888_8888' fast path

14 years agoARM: added 'neon_composite_add_8888_8888' fast path
Siarhei Siamashka [Tue, 8 Dec 2009 12:39:41 +0000 (14:39 +0200)]
ARM: added 'neon_composite_add_8888_8888' fast path

14 years agoARM: added 'neon_composite_over_8888_8_8888' fast path
Siarhei Siamashka [Mon, 7 Dec 2009 20:53:30 +0000 (22:53 +0200)]
ARM: added 'neon_composite_over_8888_8_8888' fast path

14 years agoARM: added 'neon_composite_over_8888_8888_8888' fast path
Siarhei Siamashka [Mon, 7 Dec 2009 20:42:17 +0000 (22:42 +0200)]
ARM: added 'neon_composite_over_8888_8888_8888' fast path

14 years agoARM: minor source formatting changes
Siarhei Siamashka [Tue, 8 Dec 2009 12:13:12 +0000 (14:13 +0200)]
ARM: minor source formatting changes

Now it's a bit harder to exceed 80 characters line limit
when binding assembly functions.

14 years agoARM: added '.arch armv7a' directive to NEON assembly file
Siarhei Siamashka [Tue, 8 Dec 2009 06:52:34 +0000 (08:52 +0200)]
ARM: added '.arch armv7a' directive to NEON assembly file

This fix prevents build failure due to not accepting PLD instruction when
compiling for armv4 cpu with the relevant -mcpu/-march options set in CFLAGS.

14 years agoMake test program not throw warnings about undefined variables
Benjamin Otte [Sat, 28 Nov 2009 10:38:43 +0000 (11:38 +0100)]
Make test program not throw warnings about undefined variables

14 years agoFix bug that prevented pixman_fill MMX and SSE paths for 16 and 8bpp
Benjamin Otte [Fri, 27 Nov 2009 21:02:54 +0000 (22:02 +0100)]
Fix bug that prevented pixman_fill MMX and SSE paths for 16 and 8bpp

14 years agoARM: NEON optimized pixman_blt
Siarhei Siamashka [Wed, 18 Nov 2009 02:26:18 +0000 (04:26 +0200)]
ARM: NEON optimized pixman_blt

NEON unit has fast access to L1/L2 caches and even simple
copy of memory buffers using NEON provides more than 1.5x
performance improvement on ARM Cortex-A8.

14 years agotest: support for testing pixbuf fast path functions in blitters-test
Siarhei Siamashka [Thu, 5 Nov 2009 21:15:27 +0000 (23:15 +0200)]
test: support for testing pixbuf fast path functions in blitters-test

14 years agoRemove nonexistant function from header
Benjamin Otte [Sun, 22 Nov 2009 03:34:01 +0000 (04:34 +0100)]
Remove nonexistant function from header

14 years agoPost-release version bump
Søren Sandmann Pedersen [Fri, 20 Nov 2009 11:02:50 +0000 (12:02 +0100)]
Post-release version bump

14 years agoPre-release version bump
Søren Sandmann Pedersen [Fri, 20 Nov 2009 10:55:40 +0000 (11:55 +0100)]
Pre-release version bump

14 years agoRemove stray semicolon from blitters-test.c
Søren Sandmann Pedersen [Fri, 20 Nov 2009 08:35:48 +0000 (09:35 +0100)]
Remove stray semicolon from blitters-test.c

Pointed out by scottmc2@gmail.com in bug 25137.

14 years agoC fast path function for 'over_n_1_0565'
Siarhei Siamashka [Mon, 9 Nov 2009 12:10:00 +0000 (14:10 +0200)]
C fast path function for 'over_n_1_0565'

This function is needed to improve performance of xfce4 terminal when
using bitmap fonts and running with 16bpp desktop. Some other applications
may potentially benefit too.

After applying this patch, top functions from Xorg process in
oprofile log change from

samples  %        image name               symbol name
13296    29.1528  libpixman-1.so.0.17.1    combine_over_u
6452     14.1466  libpixman-1.so.0.17.1    fetch_scanline_r5g6b5
5516     12.0944  libpixman-1.so.0.17.1    fetch_scanline_a1
2273      4.9838  libpixman-1.so.0.17.1    store_scanline_r5g6b5
1741      3.8173  libpixman-1.so.0.17.1    fast_composite_add_1000_1000
1718      3.7669  libc-2.9.so              memcpy

to

samples  %        image name               symbol name
5594     14.7033  libpixman-1.so.0.17.1    fast_composite_over_n_1_0565
4323     11.3626  libc-2.9.so              memcpy
3695      9.7119  libpixman-1.so.0.17.1    fast_composite_add_1000_1000

when scrolling text in terminal (reading man page).

14 years agoDelete the flags field from fast_path_info_t
Søren Sandmann Pedersen [Sat, 12 Sep 2009 08:24:04 +0000 (04:24 -0400)]
Delete the flags field from fast_path_info_t

14 years agoEliminate NEED_PIXBUF flag.
Søren Sandmann Pedersen [Sat, 12 Sep 2009 06:47:39 +0000 (02:47 -0400)]
Eliminate NEED_PIXBUF flag.

Instead introduce two new fake formats

PIXMAN_pixbuf
PIXMAN_rpixbuf

and compute whether the source and mask have them in
find_fast_path(). This lead to some duplicate entries in the fast path
tables that could then be removed.

14 years agoCompute src_format outside the fast path loop.
Søren Sandmann Pedersen [Sat, 12 Sep 2009 06:11:12 +0000 (02:11 -0400)]
Compute src_format outside the fast path loop.

Inside the loop all we have to do is check that the formats match.

14 years agoEliminate the NEED_COMPONENT_ALPHA flag.
Søren Sandmann Pedersen [Sat, 12 Sep 2009 05:53:54 +0000 (01:53 -0400)]
Eliminate the NEED_COMPONENT_ALPHA flag.

Instead introduce two new fake formats

PIXMAN_a8r8g8b8_ca
PIXMAN_a8b8g8r8_ca

that are used in the fast path tables for this case.

14 years agoEliminate the NEED_SOLID_MASK flag
Søren Sandmann Pedersen [Sat, 12 Sep 2009 05:35:56 +0000 (01:35 -0400)]
Eliminate the NEED_SOLID_MASK flag

This flag was used to indicate that the mask was solid while still
allowing a specific format to be required. However, there is not
actually any need for this because the fast paths all used
_pixman_image_get_solid() which already allowed arbitrary formats.

The one thing that had to be dealt with was component alpha. In
addition to interpreting the presence of the NEED_COMPONENT_ALPHA
flag, we now also interprete the *absence* of this flag as a
requirement that the mask does *not* have component alpha.

Siarhei Siamashka pointed out that the first version of this commit
had a bug, in which a NEED_SOLID_MASK was accidentally not turned into
a PIXMAN_solid in the ARM NEON implementation.

14 years agoUse the destination buffer directly in more cases instead of fetching.
Søren Sandmann Pedersen [Sat, 19 Sep 2009 10:14:38 +0000 (06:14 -0400)]
Use the destination buffer directly in more cases instead of fetching.

When the destination buffer is either a8r8g8b8 or x8r8g8b8, we can use
it directly instead of fetching into a temporary buffer. When the
format is x8r8g8b8, we require the operator to not make use of
destination alpha, but when it is a8r8g8b8, there are no restrictions.

This is approximately a 5% speedup on the poppler cairo benchmark:

[ # ]  backend                         test   min(s) median(s) stddev. count

Before:
[  0]    image                      poppler    6.661    6.709   0.59%    6/6

After:
[  0]    image                      poppler    6.307    6.320   0.12%    5/6

14 years agotest: Move image_endian_swap() from blitters-test.c to utils.[ch]
Søren Sandmann Pedersen [Tue, 10 Nov 2009 20:48:36 +0000 (15:48 -0500)]
test: Move image_endian_swap() from blitters-test.c to utils.[ch]

14 years agotest: Move random number generator from blitters/scaling-test to utils.[ch]
Søren Sandmann Pedersen [Tue, 10 Nov 2009 20:45:17 +0000 (15:45 -0500)]
test: Move random number generator from blitters/scaling-test to utils.[ch]

14 years agotest: In scaling-test use the crc32 from utils.c
Søren Sandmann Pedersen [Tue, 10 Nov 2009 20:32:12 +0000 (15:32 -0500)]
test: In scaling-test use the crc32 from utils.c

14 years agotest: Move CRC32 code from blitters-test to new files utils.[ch]
Søren Sandmann Pedersen [Tue, 10 Nov 2009 20:29:20 +0000 (15:29 -0500)]
test: Move CRC32 code from blitters-test to new files utils.[ch]

14 years agotest: Rename utils.[ch] to gtk-utils.[ch]
Søren Sandmann Pedersen [Tue, 10 Nov 2009 19:58:19 +0000 (14:58 -0500)]
test: Rename utils.[ch] to gtk-utils.[ch]

14 years agosse2: Add a fast path for OVER 8888 x 8 x 8888
Søren Sandmann Pedersen [Sun, 20 Sep 2009 21:37:36 +0000 (17:37 -0400)]
sse2: Add a fast path for OVER 8888 x 8 x 8888

This is a small speedup on the swfdec-youtube benchmark:

Before:
[  0]    image               swfdec-youtube    5.789    5.806   0.20%    6/6

After:
[  0]    image               swfdec-youtube    5.489    5.524   0.27%    6/6

Ie., approximately 5% faster.

14 years agoARM: enabled 'neon_composite_add_8000_8000' fast path
Siarhei Siamashka [Wed, 4 Nov 2009 15:14:14 +0000 (17:14 +0200)]
ARM: enabled 'neon_composite_add_8000_8000' fast path

14 years agoARM: enabled 'neon_composite_add_8_8_8' fast path
Siarhei Siamashka [Wed, 4 Nov 2009 15:13:31 +0000 (17:13 +0200)]
ARM: enabled 'neon_composite_add_8_8_8' fast path

14 years agoARM: enabled 'neon_composite_add_n_8_8' fast path
Siarhei Siamashka [Wed, 4 Nov 2009 15:12:56 +0000 (17:12 +0200)]
ARM: enabled 'neon_composite_add_n_8_8' fast path

14 years agoARM: enabled 'neon_composite_over_8888_8888' fast path
Siarhei Siamashka [Wed, 4 Nov 2009 15:12:14 +0000 (17:12 +0200)]
ARM: enabled 'neon_composite_over_8888_8888' fast path

14 years agoARM: enabled 'neon_composite_over_8888_0565' fast path
Siarhei Siamashka [Wed, 4 Nov 2009 15:11:32 +0000 (17:11 +0200)]
ARM: enabled 'neon_composite_over_8888_0565' fast path

14 years agoARM: enabled 'neon_composite_over_8888_n_8888' fast path
Siarhei Siamashka [Wed, 4 Nov 2009 15:10:55 +0000 (17:10 +0200)]
ARM: enabled 'neon_composite_over_8888_n_8888' fast path