[Pixman] [PATCH] pixman.h: Only define stdint types when PIXMAN_DONT_DEFINE_STDINT is undefined

2010-03-08 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com In SPICE, with Microsoft Visual C++, pixman.h is included after another file that defines these types, which causes warnings and errors. This patch allows such code to just define PIXMAN_DONT_DEFINE_STDINT to use its own version of those types. Cc

[Pixman] [PATCH 0/2] Thread local support on OS X

2010-03-16 Thread Søren Sandmann
So apparently OS X does not support __thread which means current pixman does not compile there. See this: http://tinderbox.x.org/builds/2010-03-16-0022/logs/pixman/#build The following patches add some macros that expand to various types of thread local support. On Linux, Unix, and

[Pixman] [PATCH] Don't use __thread on MinGW.

2010-05-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com It is apparently broken. See this: http://mingw-users.1079350.n2.nabble.com/gcc-4-4-multi-threaded-exception-handling-thread-specifier-not-working-td3440749.html We'll need to support thread local storage on MinGW32 some other way. Cc: t...@iki.fi

[Pixman] [PATCH] Add macros for thread local storage on MinGW 32

2010-05-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com These macros are identical to the ones that Tor Lillqvist posted here: http://lists.freedesktop.org/archives/pixman/2010-April/000160.html with one exception: the variable is allocated with calloc() and not malloc(). Cc: t...@iki.fi --- pixman

[Pixman] [PATCH] In the FAST_NEAREST macro call the function 8888_8888 and not x888_x888

2010-07-13 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com The x888 suggests that they have something to do with the x8r8g8b8 formats, but that's not the case; they are assuming a8r8g8b8 formats. (Although in some cases they also work for x8r8g8b8 type formats). --- pixman/pixman-fast-path.c | 36

[Pixman] [PATCH] fast-path: Some formatting fixes

2010-07-13 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Add spaces before parentheses; fix indentation in the macro. --- pixman/pixman-fast-path.c | 26 +- 1 files changed, 13 insertions(+), 13 deletions(-) diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c index

[Pixman] [PATCH] bits: Fix potential divide-by-zero in projective code

2010-07-15 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com If the homogeneous coordinate is 0, just set the coordinates to 0. --- pixman/pixman-bits-image.c | 16 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c index

[Pixman] [PATCH] If we bail out of do_composite, make sure to undo any workarounds.

2010-07-28 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com The workaround for an old X bug has to be undone if we bail from do_composite, so we can't just return. --- pixman/pixman.c |5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/pixman/pixman.c b/pixman/pixman.c index 80a766a

[Pixman] [PATCH 2/7] Eliminate get_pixel_32() and get_pixel_64() from bits_image.

2010-07-29 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com These functions can simply be passed as arguments to the various pixel fetchers. We don't need to store them. Since they are known at compile time and the pixel fetchers are force_inline, this is not a performance issue. Also temporarily make all

[Pixman] [PATCH 4/7] Eliminate the store_scanline_{32, 64} function pointers.

2010-07-29 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Now that we can't recurse on alpha maps, they are not needed anymore. --- pixman/pixman-bits-image.c | 54 +--- pixman/pixman-private.h|4 --- 2 files changed, 16 insertions(+), 42 deletions(-) diff

[Pixman] [PATCH 5/7] Remove _raw_ from all the accessors.

2010-07-29 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com There are no non-raw accessors anymore. --- pixman/pixman-access.c | 40 pixman/pixman-bits-image.c | 28 ++-- pixman/pixman-private.h| 19 +++ 3 files

[Pixman] [PATCH] Add support for AltiVec detection for OpenBSD/PowerPC.

2010-07-31 Thread Søren Sandmann
From: Brad Smith b...@comstyle.com Bug 29331. --- pixman/pixman-cpu.c | 25 - 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/pixman/pixman-cpu.c b/pixman/pixman-cpu.c index e96b140..1b31885 100644 --- a/pixman/pixman-cpu.c +++ b/pixman/pixman-cpu.c @@

[Pixman] [PATCH] pixman_image_set_alpha_map(): Disallow alpha map cycles

2010-08-04 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com If someone tries to set an alpha map that itself has an alpha map, simply return. Also, if someone tries to add an alpha map to an image that is being _used_ as an alpha map, simply return. This ensures that an alpha map can never have an alpha map

[Pixman] [PATCH] Merge pixman_image_composite32() and do_composite().

2010-08-22 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com There is not much point having a separate function that just validates the images. Also add a boolean return to lookup_composite_function() so that we can return if no composite function is found. --- pixman/pixman.c | 131

[Pixman] [PATCH] Store a2b2g2r2 pixel through the WRITE macro

2010-08-29 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Otherwise, accessor functions won't work. --- pixman/pixman-access.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pixman/pixman-access.c b/pixman/pixman-access.c index 56de711..f1ce0ba 100644 --- a/pixman/pixman

[Pixman] [PATCH] When pixman_compute_composite_region32() return FALSE, don't fini the region.

2010-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com The rule is that the region passed in must be initialized and that the region returned will still be valid. Ie., the lifecycle is the responsibility of the caller, regardless of what the function returns. Previously, composite_region32() would

[Pixman] [PATCH] Silence some warnings about uninitialized variables

2010-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Neither were real problems, but GCC were complaining about them. --- pixman/pixman.c |3 +++ test/composite.c |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/pixman/pixman.c b/pixman/pixman.c index 62b58b8..47ffdd6

[Pixman] [PATCH] Do opacity computation with shifts instead of comparing with 0

2010-09-12 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Also add a COMPILE_TIME_ASSERT() macro and use it to assert that the shift is correct. --- pixman/pixman-private.h |3 +++ pixman/pixman.c | 14 +- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pixman

[Pixman] [PATCH 2/5] Update and extend the alphamap test

2010-09-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com - Test many more combinations of formats - Test destination alpha maps - Test various different alpha origins Also add a transformation to the destination, but comment it out because it is actually broken at the moment (and pretty difficult to fix

[Pixman] [PATCH 3/5] Rename FAST_PATH_NO_WIDE_FORMAT to FAST_PATH_NARROW_FORMAT

2010-09-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This avoids a negative in the name. Also, by renaming the wide variable in pixman-general.c to narrow and fixing up the logic correspondingly, the code there reads a lot more straightforwardly. --- pixman/pixman-fast-path.c |2 +- pixman/pixman

[Pixman] [PATCH 4/5] Remove FAST_PATH_NARROW_FORMAT flag if there is a wide alpha map

2010-09-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com If an image has an alpha map that has wide components, then we need to use 64 bit processing for that image. We detect this situation in pixman-image.c and remove the FAST_PATH_NARROW_FORMAT flag. In pixman-general, the wide/narrow decision is now

[Pixman] [PATCH 5/5] Clip composite region against the destination alpha map extents.

2010-09-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Otherwise we can end up writing outside the alpha map. --- pixman/pixman.c | 21 + 1 files changed, 17 insertions(+), 4 deletions(-) diff --git a/pixman/pixman.c b/pixman/pixman.c index cdf4b75..285bbfc 100644 --- a/pixman

[Pixman] [PATCH 0/5] Fix various alpha map related bugs

2010-09-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen sandm...@daimi.au.dk Hi, The following patch series contains some fixes for various alpha-map related bugs. The bugs are: - We don't currently clip the composite region against the extents of the alpha map of the destination. This means that if the alpha map

[Pixman] [PATCH] Rename all the fast paths with _8000 in their names to _8

2010-09-22 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This inconsistent naming somehow survived the refactoring from a while back. --- pixman/pixman-arm-neon-asm.S | 22 +++--- pixman/pixman-arm-neon.c |4 ++-- pixman/pixman-arm-simd-asm.S |2 +- pixman/pixman-arm-simd.c

[Pixman] [PATCH] Remove broken optimizations in combine_disjoint_over_u()

2010-10-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com The first broken optimization is that it checks a != 0x00 where it should check s != 0x00. The other is that it skips the computation when alpha is 0xff. That is wrong because in the formula: min (1, (1 - Aa)/Ab) the render specification states

[Pixman] [PATCH] Plug leak in the alphamap test.

2010-10-08 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com The images are being created with non-NULL data, so we have to free it outselves. This is important because the Cygwin tinderbox is running out of memory and produces this: mmap failed on 2 1507328 mmap failed on 4 1507328 mmap

[Pixman] [PATCH] Delete the source_image_t struct.

2010-10-30 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com It serves no purpose anymore now that the source_class_t field is gone. --- pixman/pixman-conical-gradient.c | 17 - pixman/pixman-linear-gradient.c | 30 ++ pixman/pixman-private.h | 11

[Pixman] [PATCH] Add support for AltiVec detection for OpenBSD/PowerPC.

2010-12-14 Thread Søren Sandmann
From: Brad Smith b...@comstyle.com Bug 29331. --- pixman/pixman-cpu.c | 25 - 1 files changed, 24 insertions(+), 1 deletions(-) diff --git a/pixman/pixman-cpu.c b/pixman/pixman-cpu.c index e96b140..1b31885 100644 --- a/pixman/pixman-cpu.c +++ b/pixman/pixman-cpu.c @@

[Pixman] Some test suite improvements

2010-12-14 Thread Søren Sandmann
Here is a set of patches that contain some updates to the test suite. Specifically, - gradient-crash-test is extended to test more scenarios - floating point exceptions are enabled in some cases - The argument to fence_malloc() becomes a signed integer, and it will abort() if someone tries

[Pixman] [PATCH] Add enable_fp_exceptions() function in utils.[ch]

2010-12-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This function enables floating point traps if possible. --- configure.ac |8 test/utils.c | 26 ++ test/utils.h |3 +++ 3 files changed, 37 insertions(+), 0 deletions(-) diff --git a/configure.ac b

[Pixman] [PATCH] bits: Fix potential divide-by-zero in projective code

2010-12-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com If the homogeneous coordinate is 0, just set the coordinates to 0. --- pixman/pixman-bits-image.c | 16 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/pixman/pixman-bits-image.c b/pixman/pixman-bits-image.c index

[Pixman] [PATCH 2/7] Add enable_fp_exceptions() function in utils.[ch]

2010-12-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This function enables floating point traps if possible. --- configure.ac |8 test/utils.c | 26 ++ test/utils.h |3 +++ 3 files changed, 37 insertions(+), 0 deletions(-) diff --git a/configure.ac b

[Pixman] [PATCH 3/7] Extend gradient-crash-test

2010-12-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Test the gradients with various transformations, and test cases where the gradients are specified with two identical points. --- test/Makefile.am |5 ++- test/gradient-crash-test.c | 124 +-- 2

[Pixman] [PATCH 4/7] test: Move palette initialization to utils.[ch]

2010-12-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com --- test/blitters-test.c | 57 + test/utils.c | 54 +++ test/utils.h |3 ++ 3 files changed, 59 insertions(+), 55 deletions(-) diff

[Pixman] [PATCH 5/7] test/utils.c: Initialize palette-rgba to 0.

2010-12-14 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com That way it can be used with palettes that are not statically allocated, without causing valgrind issues. --- test/utils.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/test/utils.c b/test/utils.c index 4701bf6..cde9c62

[Pixman] [PATCH 1/2] Add a test compositing with the various PDF operators.

2010-12-18 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com The test has floating point exceptions enabled, and currently fails with a divide-by-zero. --- test/Makefile.am |4 ++ test/pdf-op-test.c | 84 2 files changed, 88 insertions(+), 0

[Pixman] [PATCH 2/2] Fix divide-by-zero in set_lum().

2010-12-18 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com When (l - min) or (max - l) are zero, simply set all the channels to the limit, 0 in the case of (l - min), and a in the case of (max - l). --- pixman/pixman-combine.c.template | 30 -- 1 files changed, 24 insertions

[Pixman] [PATCH] sse2: Skip src pixels that are zero in sse2_composite_over_8888_n_8888()

2010-12-20 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This is a big speed-up in the SVG helicopter game: http://ie.microsoft.com/testdrive/Performance/Helicopter/Default.xhtml when rendered by Firefox 4 since it is compositing big images consisting almost entirely of zeros. --- pixman/pixman-sse2.c

[Pixman] [PATCH 03/18] Eliminate the _pixman_image_store_scanline_32/64 functions.

2011-01-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com They were only called from next_line_write_narrow/wide, so they could simply be absorbed into those functions. --- pixman/pixman-bits-image.c | 79 pixman/pixman-private.h| 17 - 2 files

[Pixman] [PATCH 06/18] Add _pixman_radial_gradient_iter_init() and call it from pixman-general.c

2011-01-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com --- pixman/pixman-general.c |5 + pixman/pixman-private.h | 11 +++ pixman/pixman-radial-gradient.c | 34 ++ 3 files changed, 50 insertions(+), 0 deletions(-) diff --git a/pixman

[Pixman] [PATCH 01/18] Add iterators in the general implementation

2011-01-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com We add a new structure called a pixman_iter_t that encapsulates the information required to read scanlines from an image. It contains two functions, get_scanline() and next_line(), where get_scanline() will generate pixels for the current scanline

[Pixman] [PATCH 10/18] Move get_scanline_32/64 to the bits part of the image struct.

2011-01-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com At this point these functions are basically a cache that the bits image uses for its fetchers, so they can be moved to the bits image. With the scanline getters only being initialized in the bits image, the _pixman_image_get_scanline_generic_64 can

[Pixman] [PATCH 02/18] Move initialization of iterators for bits images to pixman-bits-image.c

2011-01-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com pixman_iter_t is now defined in pixman-private.h, and iterators for bits images are being. The function next_line_regular() is needed in both pixman-general.c and pixman-bits-image.c, so rename it to _pixman_iter_next_line_regular() and move

[Pixman] [PATCH 04/18] Add _pixman_linear_gradient_iter_init().

2011-01-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Call it from pixman-general.c to initialize linear gradient iterators. --- pixman/pixman-general.c |5 pixman/pixman-linear-gradient.c | 43 +++ pixman/pixman-private.h |5 3

[Pixman] [PATCH 05/18] Add _pixman_solid_fill_iter_init() and call it from pixman-general.c

2011-01-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Also move next_line_noop() to pixman-utils.c since it is used in both pixman-solid-fill.c and pixman-general.c --- pixman/pixman-general.c| 12 ++-- pixman/pixman-private.h| 12 pixman/pixman-solid-fill.c | 21

[Pixman] [PATCH 16/18] Skip fetching pixels when possible

2011-01-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Add two new iterator flags, ITER_IGNORE_ALPHA and ITER_IGNORE_RGB that are set when the alpha and rgb values are not needed. If both are set, then we can skip fetching entirely and just use _pixman_iter_get_scanline_noop. --- pixman/pixman-bits

[Pixman] [PATCH 18/18] Fix destination fetching.

2011-01-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com When fetching from destinations, we need to ignore transformations, repeat and filtering. Currently we don't ignore them, which means all kinds of bad things can happen. This bug fixes this problem by separating the concepts of source and destination

[Pixman] [PATCH 03/15] Eliminate the _pixman_image_store_scanline_32/64 functions.

2011-01-08 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com They were only called from next_line_write_narrow/wide, so they could simply be absorbed into those functions. --- pixman/pixman-bits-image.c | 79 pixman/pixman-private.h| 17 - 2 files

[Pixman] [PATCH 05/15] Virtualize iterator initialization

2011-01-08 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Make src_iter_init() and dest_iter_init() virtual methods in the implementation struct. This allows individual implementations to plug in their own CPU specific scanline fetchers. --- pixman/pixman-general.c| 52

[Pixman] [PATCH 06/15] Use an iterator in pixman_image_get_solid().

2011-01-08 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This is a step towards getting rid of the _pixman_image_get_scanline_32/64() functions. --- pixman/pixman-arm-common.h |9 ++--- pixman/pixman-fast-path.c | 22 +++--- pixman/pixman-image.c | 12 +--- pixman

[Pixman] [PATCH 14/15] Turn on testing for destination transformation

2011-01-08 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com --- test/alphamap.c | 11 --- 1 files changed, 4 insertions(+), 7 deletions(-) diff --git a/test/alphamap.c b/test/alphamap.c index 9fb8969..554b309 100644 --- a/test/alphamap.c +++ b/test/alphamap.c @@ -165,20 +165,17 @@ run_test (int s

[Pixman] [PATCH 15/15] Fix destination fetching.

2011-01-08 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com When fetching from destinations, we need to ignore transformations, repeat and filtering. Currently we don't ignore them, which means all kinds of bad things can happen. This bug fixes this problem by directly calling the scanline fetchers

[Pixman] [PATCH] Move fallback decisions from implementations into pixman-cpu.c.

2011-01-24 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Instead of having each individual implementation decide which fallback to use, move it into pixman-cpu.c, where a more global decision can be made. This is accomplished by adding a fallback argument to all the pixman_implementation_create_

[Pixman] [PATCH 1/5] Add a test for over_x888_8_0565 in lowlevel_blt_bench().

2011-01-28 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com The next few commits will speed this up quite a bit. Current output: --- reference memcpy speed = 2217.5MB/s (554.4MP/s for 32bpp fills) --- over_x888_8_0565 = L1: 54.67 L2: 54.01 M: 52.33 ( 18.88%) HT: 37.19 VT: 35.54 R: 29.40 RT: 13.63

[Pixman] [PATCH 2/5] Add SSE2 fetcher for x8r8g8b8

2011-01-28 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com New output of lowlevel-blt-bench over_x888_8_0565: over_x888_8_0565 = L1: 55.68 L2: 55.11 M: 52.83 ( 19.04%) HT: 39.62 VT: 37.70 R: 30.88 RT: 14.62 ( 174Kops/s) The fetcher is looked up in a table, so that other fetchers can easily

[Pixman] [PATCH 4/5] Improve performance of sse2_combine_over_u()

2011-01-28 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Split this function into two, one that has a mask, and one that doesn't. This is a fairly substantial speed-up in many cases. New output of lowlevel-blt-bench over_x888_8_0565: over_x888_8_0565 = L1: 63.76 L2: 62.75 M: 59.37 ( 21.55%) HT

[Pixman] [PATCH 5/5] Add SSE2 fetcher for 0565

2011-01-28 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Before: add_0565_0565 = L1: 61.08 L2: 61.03 M: 60.57 ( 10.95%) HT: 46.85 VT: 45.25 R: 39.99 RT: 20.41 ( 233Kops/s) After: add_0565_0565 = L1: 77.84 L2: 76.25 M: 75.38 ( 13.71%) HT: 55.99 VT: 54.56 R: 45.41 RT: 21.95 ( 255Kops/s

[Pixman] [PATCH 2/3] Add @TESTPROGS_EXTRA_LDFLAGS@ to AM_LDFLAGS

2011-02-10 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Instead of explicitly adding it to each test program. --- test/Makefile.am | 18 +- 1 files changed, 1 insertions(+), 17 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index 92ee8fd..0f03153 100644 --- a/test

[Pixman] [PATCH 3/3] test/Makefile.am: Move all the TEST_LDADD into a new global LDADD.

2011-02-10 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This gets rid of a bunch of replicated *_LDADD clauses --- test/Makefile.am | 35 +-- 1 files changed, 1 insertions(+), 34 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index 0f03153..3ce466e 100644

[Pixman] [PATCH 1/3] In delegate_{src, dest}_iter_init() call delegate directly.

2011-03-12 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com There is no reason to go through _pixman_implementation_{src,dest}_iter_init(), especially since _pixman_implementation_src_iter_init() is doing various other checks that only need to be done once. Also call delegate-src_iter_init() directly

[Pixman] [PATCH 3/3] Simplify the prototype for iterator initializers.

2011-03-12 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com All of the information previously passed to the iterator initializers is now available in the iterator itself, so there is no need to pass it as arguments anymore. --- pixman/pixman-bits-image.c | 20 +- pixman/pixman-conical

[Pixman] [PATCH 2/3] Fill out parts of iters in _pixman_implementation_{src, dest}_iter_init()

2011-03-12 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This makes _pixman_implementation_{src,dest}_iter_init() responsible for filling parts of the information in the iterators. Specifically, the information passed as arguments is stored in the iterator. Also add a height field to pixman_iter_t

[Pixman] [PATCH] test: Randomize some tests if PIXMAN_RANDOMIZE_TESTS is set

2011-03-15 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This patch makes so that composite and stress-test will start from a random seed if the PIXMAN_RANDOMIZE_TESTS environment variable is set. Running the test suite in this mode is useful to get more test coverage. Also, in stress-test.c make it so

[Pixman] [PATCH 1/3] mmx: Delete some unused variables

2011-05-28 Thread Søren Sandmann
From: Søren Sandmann Pedersen ssp@hp-sandybridge.(none) --- pixman/pixman-mmx.c | 17 +++-- 1 files changed, 3 insertions(+), 14 deletions(-) diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c index 0272347..62a73d6 100644 --- a/pixman/pixman-mmx.c +++ b/pixman/pixman-mmx.c

[Pixman] [PATCH 2/3] sse2: Delete some unused variables

2011-05-28 Thread Søren Sandmann
From: Søren Sandmann Pedersen ssp@hp-sandybridge.(none) --- pixman/pixman-mmx.c |2 +- pixman/pixman-sse2.c | 18 -- 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c index 62a73d6..0185df6 100644 --- a/pixman/pixman

[Pixman] [PATCH 3/3] demos: Comment out some unused variables

2011-05-28 Thread Søren Sandmann
From: Søren Sandmann Pedersen ssp@hp-sandybridge.(none) --- demos/alpha-test.c|4 +++- demos/gradient-test.c |4 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/demos/alpha-test.c b/demos/alpha-test.c index 92c2081..54e30fa 100644 --- a/demos/alpha-test.c +++ b

[Pixman] [PATCH 2/2] ARM: Fix two bugs in neon_composite_over_n_8888_0565_ca().

2011-06-20 Thread Søren Sandmann
The first bug is that a vmull.u8 instruction would store its result in the q1 register, clobbering the d2 register used later on. The second is that a vraddhn instruction would overwrite d25, corrupting the q12 register used later. Fixing the second bug caused a pipeline bubble where the d18

[Pixman] [PATCH 1/2] blitters-test: Make common formats more likely to be tested.

2011-06-20 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Move the eight most common formats to the top of the list of image formats and make create_random_image() much more likely to select one of those eight formats. This should help catch more bugs in SIMD optimized operations. --- test/blitters-test.c

[Pixman] Speed up pixman_region_contains_{rectangle,point}

2011-08-03 Thread Søren Sandmann
This patch series contains a speed-up for the two functions pixman_region_contains_rectangle() and pixman_region_contains_point(). The main usecase is when you select some text in Firefox and drag it, a shaped window with a complicated shape will be created, and the X server will call

[Pixman] [PATCH 4/4] Use find_box_for_y in pixman_region_contains_point() too

2011-08-03 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com The same binary search from the previous commit can be used in this function too. --- pixman/pixman-region.c |9 ++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c index

[Pixman] [PATCH 2/4] New test of pixman_region_contains_{rectangle, point}

2011-08-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This test generates random regions and checks whether random boxes and points are contained within them. The results are combined and a CRC32 value is computed and compared to a known-correct one. --- test/Makefile.am|2 + test/region

[Pixman] [PATCH 4/4] Use find_box_for_y() in pixman_region_contains_point() too

2011-08-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com The same binary search from the previous commit can be used in this function too. V2: Remove check from loop that is not needed anymore, pointed out by Andrea Canciani. --- pixman/pixman-region.c | 12 ++-- 1 files changed, 6 insertions

[Pixman] [PATCH] In pixman_image_create_bits() allow images larger than 2GB

2011-08-11 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com There is no reason for pixman_image_create_bits() to check that the image size fits in int32_t. The correct check is against size_t since that is what the argument to calloc() is. This patch fixes this by adding a new _pixman_multiply_overflows_size

[Pixman] Consolidate some inlined functions

2011-08-15 Thread Søren Sandmann
These three patches rename pixman-fast-path.h to pixman-inlines.h, since this file is not really specific to the fast path implementation, and then it moves some code from the general implementation into that file: the repeat functionality, which was duplicated, and the bilinear interpolation

[Pixman] [PATCH 0/11] Use macros to generate fetchers

2011-09-02 Thread Søren Sandmann
This patch series change pixman-access.c to generate most accessors with macros and inline functions instead of writing out the code for all the functions. This is a fairly significant saving in terms of lines of code: pixman-access.c | 3159

[Pixman] [PATCH 01/11] Add a generic unorm_to_unorm() conversion utility

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This function can convert between normalized numbers of different depths. When converting to higher bit depths, it will replicate the existing bits, when converting to lower bit depths, it will simply truncate. This function replaces the expand16

[Pixman] [PATCH 02/11] Add general pixel converter

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com This function can convert between any = 32 bpp formats. Nothing uses it yet. --- pixman/pixman-access.c | 100 1 files changed, 100 insertions(+), 0 deletions(-) diff --git a/pixman/pixman-access.c b

[Pixman] [PATCH 04/11] Use MAKE_ACCESSORS() to generate all the 32 bit accessors

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Add support for 32bpp formats in fetch_and_convert_pixel() and convert_and_store_pixel(), then use MAKE_ACCESSORS() to generate accessors for all the 32 bpp formats: a8r8g8b8 x8r8g8b8 a8b8g8r8 x8b8g8r8 x14r6g6b6 b8g8r8a8

[Pixman] [PATCH 05/11] Use MAKE_ACCESSORS() to generate accessors for all the 16bpp formats

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Add support for 16bpp pixels to fetch_and_convert_pixel() and convert_and_store_pixel(), then use MAKE_ACCESSORS() to generate accessors for all the 16bpp formats: r5g6b5 b5g6r5 a1r5g5b5 x1r5g5b5 a1b5g5r5 x1b5g5r5 a4r4g4b4

[Pixman] [PATCH 06/11] Use MAKE_ACCESSORS() to generate accessors for 8bpp RGB formats

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Add support for 8 bpp formats to fetch_and_convert_pixel() and convert_and_store_pixel(), then use MAKE_ACCESSORS() to generate the accessors for all the 8 bpp formats, except g8 and c8, which are indexed: a8 r3g3b2 b2g3r3 a2r2g2b2

[Pixman] [PATCH 08/11] Use MAKE_ACCESSORS() to generate accessors for 24bpp formats

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Add FETCH_24 and STORE_24 macros and use them to add support for 24bpp pixels in fetch_and_convert_pixel() and convert_and_store_pixel(). Then use MAKE_ACCESSORS() to generate accessors for the 24 bpp formats: r8g8b8 b8g8r8 --- pixman/pixman

[Pixman] [PATCH 09/11] Use MAKE_ACCESSORS() to generate accessors for the a1 format.

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Add FETCH_1 and STORE_1 macros and use them to add support for 1bpp pixels to fetch_and_convert_pixel() and convert_and_store_pixel(), then use MAKE_ACCESSORS() to generate the accessors for the a1 format. (Not the g1 format as it is indexed

[Pixman] [PATCH 10/11] Use MAKE_ACCESSORS() to generate accessors for paletted formats

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Add support in convert_pixel_from_a8r8g8b8() and convert_pixel_to_a8r8g8b8() for conversion to/from paletted formats, then use MAKE_ACCESSORS() to generate accessors for the indexed formats: c8, g8, g4, c4, g1 --- pixman/pixman-access.c | 276

[Pixman] [PATCH 11/11] Add some fast paths to convert_pixel()

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com All the inlining going on makes gcc generate slightly suboptimal code, so add some special cases for the common formats a8r8g8b8, x8r8g8b8, a8, and r5g6b5. --- pixman/pixman-access.c | 53 1 files

[Pixman] [PATCH] test: New function to save a pixman image to .png

2011-09-02 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com When debugging it is often very useful to be able to save an image as a png file. This commit adds a function write_png() that does that. If libpng is not available, then the function becomes a noop. --- configure.ac | 11 + test

[Pixman] [PATCH] Eliminate compute_sample_extents() function

2011-09-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com In analyze_extents(), instead of calling compute_sample_extents() twice, just call compute_transformed_extents() once. Instead of calling compute_sample_extents() for the destination rectangle expanded by one, just call compute_transformed_extents

[Pixman] [PATCH] Split computation of sample area into own function

2011-09-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com compute_sample_extents() have two parts: one that computes the transformed extents, and one that checks whether the computed extents fit within the 16.16 coordinate space. Split the first part into its own function compute_transformed_extents

[Pixman] [PATCH] test: better coverage for BILINEAR-NEAREST filter optimization

2011-09-05 Thread Søren Sandmann
From: Siarhei Siamashka siarhei.siamas...@nokia.com The upcoming optimization which is going to be able to replace BILINEAR filter with NEAREST where appropriate needs to analyze the transformation matrix and not to make any mistakes. The changes to affine-test include: 1. Higher chance of using

[Pixman] [PATCH] BILINEAR-NEAREST filter optimization for simple rotation and translation

2011-09-05 Thread Søren Sandmann
From: Siarhei Siamashka siarhei.siamas...@nokia.com Simple rotation and translation are the additional cases when BILINEAR filter can be safely reduced to NEAREST. --- pixman/pixman-image.c | 39 ++- 1 files changed, 38 insertions(+), 1 deletions(-) diff

[Pixman] [PATCH] Strength-reduce BILINEAR filter to NEAREST filter for identity transforms

2011-09-05 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com An image with a bilinear filter and an identity transform is equivalent to one with a nearest filter, so there is no reason the standard fast paths shouldn't be usable. But because a BILINEAR filter samples a 2x2 pixel block in the source image

[Pixman] [PATCH] Only link with -lpng when libpng is actually available

2011-09-11 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Fixes build on systems that don't have libpng --- configure.ac |1 + test/Makefile.am |5 - 2 files changed, 5 insertions(+), 1 deletions(-) diff --git a/configure.ac b/configure.ac index 21613e1..fdb2521 100644 --- a/configure.ac

Re: [Pixman] [PATCH] Only link with -lpng when libpng is actually available

2011-09-11 Thread Søren Sandmann
How about using pkg-config to detect the availability of libpng and the flags required to use it? Good idea. New patch to follow. Soren ___ Pixman mailing list Pixman@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pixman

[Pixman] [PATCH] Use pkg-config to determine the flags to use with libpng

2011-09-11 Thread Søren Sandmann
From: Søren Sandmann Pedersen s...@redhat.com Previously we would unconditionally link with -lpng leading to build failures on systems without libpng. --- configure.ac |2 +- test/Makefile.am |4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configure.ac b

Re: [Pixman] [PATCH 1/3] Add CLEAR and SRC linear interpolation operators

2011-09-15 Thread Søren Sandmann
Chris Wilson ch...@chris-wilson.co.uk writes: Cairo, for instance, has a subtly different interpretation of how to use the mask in combination with the Porter-Duff operators. In particular, it has the notion of a clip mask, for which pixman has no parallel. Quoting Soeren: Another aspect

Re: [Pixman] [PATCH 1/3] Add CLEAR and SRC linear interpolation operators

2011-09-15 Thread Søren Sandmann
Chris Wilson ch...@chris-wilson.co.uk writes: Did you see Taekyun Kim's reply to this? He proposes this API: pixman_image_composite_xrender(op, src, shape, clip, dst) pixman_image_composite_bounded(op, src, shape, clip, dst) pixman_image_composite_simple(op, src, shape, clip,

Re: [Pixman] [PATCH 1/3] Add CLEAR and SRC linear interpolation operators

2011-09-16 Thread Søren Sandmann
Chris Wilson ch...@chris-wilson.co.uk writes: On Thu, 15 Sep 2011 13:26:09 +0200, sandm...@cs.au.dk (=?utf-8?Q?S=C3=B8ren?= Sandmann) wrote: Chris Wilson ch...@chris-wilson.co.uk writes: Did you see Taekyun Kim's reply to this? He proposes this API:

Re: [Pixman] [PATCH] Fix build on cygwin after commit efdf65c0c4fff551fb3cd9104deda9adb6261e22

2011-09-19 Thread Søren Sandmann
Jon TURNEY jon.tur...@dronecode.org.uk writes: libutils depends on pixman and so needs to preceed it in the link order Found by tinderbox, see [1] [1] http://tinderbox.freedesktop.org/builds/2011-09-15-0005/logs/pixman/#build Pushed. Soren ___

Re: [Pixman] [PATCH 5/5] Simple repeat: Extend too short source scanlines into temporary buffer

2011-09-21 Thread Søren Sandmann
Hi, From: Taekyun Kim tkq@samsung.com Too short scanlines can cause repeat handling overhead and optimized pixman composite functions usually process a bunch of pixels in a single loop iteration it might be beneficial to pre-extend source scanlines. The temporary buffers will usually

Re: [Pixman] [PATCH] fill: Special-case single pixel wide lines

2011-09-23 Thread Søren Sandmann
Chris Wilson ch...@chris-wilson.co.uk writes: A common condition (in benchmarks at least) are single pixel wide vertical lines. This is the worst-cast behaviour for the fast-paths like SSE2 which require long runs in order to offset the ramp up cost of aligning and using the SIMD registers.

Re: [Pixman] [PATCH] mmx: fix formats in commented code

2011-09-26 Thread Søren Sandmann
Matt Turner matts...@gmail.com writes: b8r8g8 is apparently no longer supported sometime since this code was commented. All three patches look good to me. If you were benchmarking the over_x888_8_() operation, is it still slower than the general code? Soren

  1   2   3   4   5   6   >