diff options
author | Ben Avison <bavison@riscosopen.org> | 2013-09-26 18:02:51 +0100 |
---|---|---|
committer | Ben Avison <bavison@riscosopen.org> | 2015-10-15 13:55:52 +0100 |
commit | 93f534440266105fdff7e00f34d021b0ccbf4db3 (patch) | |
tree | a2572be8f7ab2da407476c37e0434e04e0c1e438 | |
parent | 35a8b723b6d7c92b00e7e27270311ff37111e1e9 (diff) |
pixman-fast-path: Add over_n_8888 fast path
This is a C fast path, useful for reference or for platforms that don't
have their own fast path for this operation.
lowlevel-blt-bench results on ARMv6:
Before After
Mean StdDev Mean StdDev Confidence Change
L1 11.9 0.1 20.4 0.2 100.0% +71.1%
L2 10.6 0.2 16.5 0.4 100.0% +55.8%
M 9.4 0.0 13.5 0.0 100.0% +44.3%
HT 8.4 0.0 12.2 0.1 100.0% +43.9%
VT 8.3 0.0 11.9 0.1 100.0% +42.7%
R 8.1 0.0 11.5 0.1 100.0% +41.3%
RT 5.4 0.1 7.6 0.1 100.0% +40.3%
-rw-r--r-- | pixman/pixman-fast-path.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c index a17ca26..fccc155 100644 --- a/pixman/pixman-fast-path.c +++ b/pixman/pixman-fast-path.c @@ -1122,6 +1122,37 @@ fast_composite_over_n_1_0565 (pixman_implementation_t *imp, } } +static void +fast_composite_over_n_8888 (pixman_implementation_t *imp, + pixman_composite_info_t *info) +{ + PIXMAN_COMPOSITE_ARGS (info); + uint32_t src; + uint32_t *dst_line, *dst; + int dst_stride; + int32_t w; + + src = _pixman_image_get_solid (imp, src_image, dest_image->bits.format); + + if (src == 0) + return; + + PIXMAN_IMAGE_GET_LINE (dest_image, dest_x, dest_y, uint32_t, dst_stride, dst_line, 1); + + while (height--) + { + dst = dst_line; + dst_line += dst_stride; + w = width; + + while (w--) + { + *dst = over (src, *dst); + dst++; + } + } +} + /* * Simple bitblt */ @@ -1838,9 +1869,13 @@ static const pixman_fast_path_t c_fast_paths[] = PIXMAN_STD_FAST_PATH (OVER, x8r8g8b8, a8, a8r8g8b8, fast_composite_over_x888_8_8888), PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, a8, x8b8g8r8, fast_composite_over_x888_8_8888), PIXMAN_STD_FAST_PATH (OVER, x8b8g8r8, a8, a8b8g8r8, fast_composite_over_x888_8_8888), + PIXMAN_STD_FAST_PATH (OVER, solid, null, a8r8g8b8, fast_composite_over_n_8888), + PIXMAN_STD_FAST_PATH (OVER, solid, null, x8r8g8b8, fast_composite_over_n_8888), PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, a8r8g8b8, fast_composite_over_8888_8888), PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, x8r8g8b8, fast_composite_over_8888_8888), PIXMAN_STD_FAST_PATH (OVER, a8r8g8b8, null, r5g6b5, fast_composite_over_8888_0565), + PIXMAN_STD_FAST_PATH (OVER, solid, null, a8b8g8r8, fast_composite_over_n_8888), + PIXMAN_STD_FAST_PATH (OVER, solid, null, x8b8g8r8, fast_composite_over_n_8888), PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, a8b8g8r8, fast_composite_over_8888_8888), PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, x8b8g8r8, fast_composite_over_8888_8888), PIXMAN_STD_FAST_PATH (OVER, a8b8g8r8, null, b5g6r5, fast_composite_over_8888_0565), |