summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-03-15Use FAST_PATH_16BIT_SAFE flag in normal repeat nearest scaleralex-scalerAlexander Larsson1-1/+1
This is needed to avoid overflows in the nearest repeat handler, for instance: max_vx = src_image->bits.width << 16; max_vy = src_image->bits.height << 16; These could overflow if the src image is > 16bit. And: y = vy >> 16; vy += unit_y; if (do_repeat) { if (unit_y >= 0) while (vy >= max_vy) vy -= max_vy; If vy += unit_y overflows the while check can fail.ove 16bit flag
2010-03-15Add FAST_PATH_16BIT_SAFE flagAlexander Larsson2-15/+42
This signifies two things: 1) The size of the src/mask fits in a 16.16 fixed point, so something like: max_vx = src_image->bits.width << 16; Is allowed and is guaranteed to not overflow max_vx 2) When stepping the source space we're guaranteed to never overflow a 16.16 bit fix point variable, even if we step one extra step in the destination space. This means that a loop doing: x = vx >> 16; vx += unit_x; d = src_row[x]; will never overflow vx causing x to be negative. And additionally, if you track vx like above and apply NORMAL repeat after the vx addition with something like: while (vx >= max_vx) vx -= max_vx; This will never overflow the vx even on the final increment that takes vx one past the end of where we will read, which makes the repeat loop safe. Conflicts: pixman/pixman-private.h
2010-03-14Move CONVERT_8888_TO_8888 and CONVERT_0565_TO_0565 macros to headerAlexander Larsson2-2/+4
These are generically useful for other macros too.
2010-03-14Remove TMP_FORMAT from scaling macro and just always use 8888Alexander Larsson1-14/+14
This works now that we added CONVERT_0565_TO_8888.
2010-03-14Add CONVERT_0565_TO_8888 macroAlexander Larsson1-0/+2
This lets us simplify some fast paths since we get a consistent naming that always has 8888 and gets some value for alpha.
2010-03-14Add specialized fast nearest scalersAlexander Larsson1-0/+261
This is a macroized version of SRC/OVER repeat normal/unneeded nearest neighbour scaling instantiated for some common 8888 and 565 formats.
2010-03-14Add FAST_PATH_SAMPLES_COVERS_CLIPAlexander Larsson2-2/+55
This is set of the source sample grid, unrepeated but transformed completely completely covers the clip destination. If this is set you can use a simple scaled that doesn't have to care about the repeat mode.
2010-03-14Add FAST_PATH_NO_NONE_REPEAT flagAlexander Larsson2-3/+8
2010-03-14test: Add support for indexed formats to blitters-testSøren Sandmann Pedersen1-3/+24
These formats work fine, they just need to have a palette set.
2010-03-14pixman.h: Only define stdint types when PIXMAN_DONT_DEFINE_STDINT is undefinedSøren Sandmann Pedersen1-0/+5
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.
2010-03-14Merge branch 'operator-table'Søren Sandmann Pedersen1-74/+103
2010-03-14Merge branch 'fast-path-cache'Søren Sandmann Pedersen3-22/+93
2010-03-14Change operator table to be an array of arrays of four bytes.Søren Sandmann Pedersen1-21/+26
This makes gcc generate slightly better code for optimize_operator.
2010-03-14Strength reduce certain conjoint/disjoint to their normal counterparts.Søren Sandmann Pedersen1-11/+8
This allows us to not test for them later on.
2010-03-14Store the operator table more compactly.Søren Sandmann Pedersen1-98/+84
The four cases for each operator: none-are-opaque, src-is-opaque, dest-is-opaque, both-are-opaque are packed into one uint32_t per operator. The relevant strength reduced operator can then be found by packing the source-is-opaque and dest-is-opaque into two bits and shifting that number of bytes. Chris Wilson pointed out a bug in the original version of this commit: dest_is_opaque and source_is_opaque were used as booleans, but their actual values were the results of a logical AND with the FAST_PATH_OPAQUE flag, so the shift value was wildly wrong. The only reason it actually passed the test suite (on x86) was that the compiler computed the shift amount in the cl register, and the low byte of FAST_PATH_OPAQUE happens to be 0, so no shifting actually took place, and the original operator was returned.
2010-03-14Make the operator strength reduction constant time.Søren Sandmann Pedersen1-46/+87
By extending the operator information table to cover all operators we can replace the loop with a table look-up. At the same time, base the operator optimization on the computed flags rather than the ones in the image struct. Finally, as an extra optimization, we no longer ignore the case where there is a mask. Instead we consider the source opaque if both source and mask are opaque, or if the source is opaque and the mask is missing.
2010-03-14ARM: SIMD: Try without any CFLAGS before forcing -mcpu=Loïc Minier1-5/+15
http://bugs.launchpad.net/bugs/535183
2010-03-12Eliminate trailing comma in enumEgor Starkov1-1/+2
https://bugs.freedesktop.org/show_bug.cgi?id=27050 Pixman is not compiling with c++ compiler. During compilation it gives the following error: /usr/include/pixman-1/pixman.h:335: error: comma at end of enumerator list Signed-off-by: Søren Sandmann Pedersen <ssp@redhat.com>
2010-03-06Add a fast path cachefast-path-cacheSøren Sandmann Pedersen3-22/+93
This patch adds a cache in front of the fast path tables to reduce the overhead of pixman_composite(). It is fixed size with move-to-front to make sure the most popular fast paths are at the beginning of the cache. The cache is thread local to avoid locking.
2010-03-05Post-release version bump to 0.17.11Søren Sandmann Pedersen1-1/+1
2010-03-05Pre-release version bump to 0.17.10Søren Sandmann Pedersen1-1/+1
2010-03-04Move __force_align_arg_pointer workaround before composite32()Søren Sandmann Pedersen1-18/+18
Since otherwise the workaround won't take effect when you call pixman_image_composite32() directly.
2010-03-04Merge branch 'more-flags'Søren Sandmann Pedersen4-254/+256
2010-03-03test: Remove obsolete commentSøren Sandmann Pedersen1-2/+0
2010-03-03ARM: added 'neon_composite_over_reverse_n_8888' fast pathSiarhei Siamashka2-0/+58
This fast path function improves performance of 'poppler' cairo-perf trace. Benchmark from ARM Cortex-A8 @720MHz before: [ # ] backend test min(s) median(s) stddev. count [ 0] image poppler 38.986 39.158 0.23% 6/6 after: [ # ] backend test min(s) median(s) stddev. count [ 0] image poppler 24.981 25.136 0.28% 6/6
2010-03-03ARM: added 'neon_composite_src_x888_8888' fast pathSiarhei Siamashka2-0/+45
This fast path function improves performance of 'gnome-system-monitor' cairo-perf trace. Benchmark from ARM Cortex-A8 @720MHz before: [ # ] backend test min(s) median(s) stddev. count [ 0] image gnome-system-monitor 68.838 68.899 0.05% 5/6 after: [ # ] backend test min(s) median(s) stddev. count [ 0] image gnome-system-monitor 53.336 53.384 0.09% 6/6
2010-03-03ARM: added 'neon_composite_over_n_8888_8888_ca' fast pathSiarhei Siamashka2-0/+110
This fast path function improves performance of 'firefox-talos-gfx' cairo-perf trace. Benchmark from ARM Cortex-A8 @720MHz before: [ # ] backend test min(s) median(s) stddev. count [ 0] image firefox-talos-gfx 139.969 141.176 0.35% 6/6 after: [ # ] backend test min(s) median(s) stddev. count [ 0] image firefox-talos-gfx 111.810 112.196 0.23% 6/6
2010-02-24Restructure the flags computation in compute_image_info().more-flagsSøren Sandmann Pedersen1-36/+59
Restructure the code to use switches instead of ifs. This saves a few comparisons and make the code slightly easier to follow. Also add some comments.
2010-02-24Move workaround code to pixman-image.cSøren Sandmann Pedersen2-58/+55
It is more natural to put it where all the other flags are computed.
2010-02-24Turn need_workaround into another flag.Søren Sandmann Pedersen4-40/+41
Instead of storing it as a boolean in the image struct, just use another flag for it.
2010-02-24Eliminate _pixman_image_is_opaque() in favor of a new FAST_PATH_IS_OPAQUE flagSøren Sandmann Pedersen3-62/+45
The new FAST_PATH_IS_OPAQUE flag is computed along with the others in _pixman_image_validate().
2010-02-24Eliminate _pixman_image_is_solid()Søren Sandmann Pedersen2-28/+15
Instead of calling this function in compute_image_info(), just do the relevant checks when the extended format is computed. Move computation of solidness to validate
2010-02-24Move computation of extended format code to validate.Søren Sandmann Pedersen3-30/+33
Instead of computing the extended format on every composite, just compute it once and store it in the image.
2010-02-24Add new FAST_PATH_SIMPLE_REPEAT flagSøren Sandmann Pedersen2-15/+12
This flags indicates that the image is untransformed an repeating. Such images can be composited quickly by simply repeating the composite operation.
2010-02-24Compute the image flags at validation time instead of composite timeSøren Sandmann Pedersen3-50/+61
Instead of computing all the image flags at composite time, we compute them once in _pixman_image_validate() and cache them in the image.
2010-02-24RELEASING: Update the release instructions.Søren Sandmann Pedersen1-16/+13
2010-02-24Post-release version bumpSøren Sandmann Pedersen1-1/+1
2010-02-24Pre-release version bumpSøren Sandmann Pedersen1-1/+1
2010-02-24Merge branch 'trap-fixes'Søren Sandmann Pedersen3-13/+17
2010-02-24Add a1-trap-testSøren Sandmann Pedersen2-0/+52
When a trapezoid sample point is exactly on a polygon edge, the rule is that it is considered inside the trapezoid if the edge is a top or left edge, but outside for bottom and right edges. This program tests that for a1 trapezoids.
2010-02-21Hide the C++ extern "C" declarations behind macros.Søren Sandmann Pedersen1-4/+8
That way they don't confuse the indenting algorithm in editors such as Emacs.
2010-02-20Merge branch 'eliminate-composite'Søren Sandmann Pedersen11-1008/+750
Conflicts: pixman/pixman-sse2.c
2010-02-20Move all code to do debugging spew into pixman-private.Søren Sandmann Pedersen4-91/+97
Rather than the region code having its own little debug system, move all of it into pixman-private where there is already return_if_fail() macros etc. These macros are now enabled in development snapshots and nowhere else. Previously they were never enabled unless you modified the code. At the same time, remove all the asserts from the region code since we can never turn them on anyway, and replace them with critical_if_fail() macros that will print spew to standard error when DEBUG is defined. Finally, also change the debugging spew in pixman-bits-image.c to use return_val_if_fail() instead of its own fprintf().
2010-02-19Test pixman_region32_init_from_image in region-testAlexander Larsson2-3/+50
2010-02-19Add pixman_region{32}_init_from_imageAlexander Larsson2-1/+261
This creates a region from an image in PIXMAN_a1 format.
2010-02-19Move SCREEN_SHIFT_LEFT/RIGHT to pixman-private.hAlexander Larsson2-8/+8
This is needed for later use in other code.
2010-02-18Compile by USE_SSE2 only without USE_MMXMakoto Kato2-3/+7
Although we added MMX emulation for Microsoft Visual C++ compiler for x64, USE_SSE2 still requires USE_MMX. So we remove dependency of USE_MMX for Windows x64. Signed-off-by: Makoto Kato <m_kato@ga2.so-net.ne.jp>
2010-02-14Move NULL check out of get_image_info()eliminate-compositeSøren Sandmann Pedersen1-56/+57
The NULL check is only necessary for masks, so there is no reason to do it for destinations and sources.
2010-02-14Add a fast path for non-repeating sources in walk_region_internal().Søren Sandmann Pedersen1-4/+31
In the common case where there is no repeating, the loop in walk_region_internal() reduces to just walking of the boxes involved and calling the composite function.
2010-02-14Move more things out of the inner loop in do_composite().Søren Sandmann Pedersen1-58/+42
Specifically, - the src_ and mask_repeat computations - the check for whether the involved images cover the composite region.