[Pixman] [PATCH] arm: Retire PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH
Pekka Paalanen
ppaalanen at gmail.com
Wed May 27 03:52:53 PDT 2015
On Tue, 26 May 2015 23:58:25 +0100
Ben Avison <bavison at riscosopen.org> wrote:
> This macro does exactly the same thing as the platform-neutral macro
> SIMPLE_NEAREST_FAST_PATH.
> ---
> This is one of a number of (independent) patches arising from a survey of
> scaled fast paths which highlighted the fact that the fast path table
> macros could be consolidated somewhat.
>
> pixman/pixman-arm-common.h | 7 -------
> pixman/pixman-arm-neon.c | 24 ++++++++++++------------
> pixman/pixman-arm-simd.c | 18 +++++++++---------
> 3 files changed, 21 insertions(+), 28 deletions(-)
>
> diff --git a/pixman/pixman-arm-common.h b/pixman/pixman-arm-common.h
> index 9b5cefb..8a552fd 100644
> --- a/pixman/pixman-arm-common.h
> +++ b/pixman/pixman-arm-common.h
> @@ -266,13 +266,6 @@ FAST_NEAREST_MAINLOOP (cputype##_##name##_normal_##op, \
> scaled_nearest_scanline_##cputype##_##name##_##op, \
> src_type, dst_type, NORMAL)
>
> -/* Provide entries for the fast path table */
> -#define PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH(op,s,d,func) \
> - SIMPLE_NEAREST_FAST_PATH_COVER (op,s,d,func), \
> - SIMPLE_NEAREST_FAST_PATH_NONE (op,s,d,func), \
> - SIMPLE_NEAREST_FAST_PATH_PAD (op,s,d,func), \
> - SIMPLE_NEAREST_FAST_PATH_NORMAL (op,s,d,func)
> -
> #define PIXMAN_ARM_BIND_SCALED_NEAREST_SRC_A8_DST(flags, cputype, name, op, \
> src_type, dst_type) \
> void \
> diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
> index 90960d7..b85fd57 100644
> --- a/pixman/pixman-arm-neon.c
> +++ b/pixman/pixman-arm-neon.c
> @@ -404,21 +404,21 @@ static const pixman_fast_path_t arm_neon_fast_paths[] =
> PIXMAN_STD_FAST_PATH (OUT_REVERSE, a8, null, x8b8g8r8, neon_composite_out_reverse_8_8888),
> PIXMAN_STD_FAST_PATH (OUT_REVERSE, a8, null, a8b8g8r8, neon_composite_out_reverse_8_8888),
>
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, neon_8888_8888),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, a8b8g8r8, neon_8888_8888),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, neon_8888_8888),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, x8b8g8r8, neon_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, neon_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, a8b8g8r8, neon_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, neon_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, x8b8g8r8, neon_8888_8888),
>
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, r5g6b5, neon_8888_0565),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, b5g6r5, neon_8888_0565),
> + SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, r5g6b5, neon_8888_0565),
> + SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, b5g6r5, neon_8888_0565),
>
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, r5g6b5, neon_8888_0565),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, x8r8g8b8, r5g6b5, neon_8888_0565),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, b5g6r5, neon_8888_0565),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, x8b8g8r8, b5g6r5, neon_8888_0565),
> + SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, r5g6b5, neon_8888_0565),
> + SIMPLE_NEAREST_FAST_PATH (SRC, x8r8g8b8, r5g6b5, neon_8888_0565),
> + SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, b5g6r5, neon_8888_0565),
> + SIMPLE_NEAREST_FAST_PATH (SRC, x8b8g8r8, b5g6r5, neon_8888_0565),
>
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, b5g6r5, x8b8g8r8, neon_0565_8888),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, r5g6b5, x8r8g8b8, neon_0565_8888),
> + SIMPLE_NEAREST_FAST_PATH (SRC, b5g6r5, x8b8g8r8, neon_0565_8888),
> + SIMPLE_NEAREST_FAST_PATH (SRC, r5g6b5, x8r8g8b8, neon_0565_8888),
> /* Note: NONE repeat is not supported yet */
> SIMPLE_NEAREST_FAST_PATH_COVER (SRC, r5g6b5, a8r8g8b8, neon_0565_8888),
> SIMPLE_NEAREST_FAST_PATH_COVER (SRC, b5g6r5, a8b8g8r8, neon_0565_8888),
> diff --git a/pixman/pixman-arm-simd.c b/pixman/pixman-arm-simd.c
> index 249a4c8..7b60bf8 100644
> --- a/pixman/pixman-arm-simd.c
> +++ b/pixman/pixman-arm-simd.c
> @@ -813,15 +813,15 @@ static const pixman_fast_path_t arm_simd_fast_paths[] =
> PIXMAN_ARM_NEAREST_SCALED_COVER_SRC_DST_FAST_PATH (armv6, OVER, a8b8g8r8, a8b8g8r8, over_8888_8888),
> PIXMAN_ARM_NEAREST_SCALED_COVER_SRC_DST_FAST_PATH (armv6, OVER, a8b8g8r8, x8b8g8r8, over_8888_8888),
>
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, r5g6b5, r5g6b5, armv6_0565_0565),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, b5g6r5, b5g6r5, armv6_0565_0565),
> -
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, armv6_8888_8888),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, armv6_8888_8888),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, armv6_8888_8888),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, a8b8g8r8, armv6_8888_8888),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, x8b8g8r8, armv6_8888_8888),
> - PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH (SRC, x8b8g8r8, x8b8g8r8, armv6_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (SRC, r5g6b5, r5g6b5, armv6_0565_0565),
> + SIMPLE_NEAREST_FAST_PATH (SRC, b5g6r5, b5g6r5, armv6_0565_0565),
> +
> + SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, armv6_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, armv6_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, armv6_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, a8b8g8r8, armv6_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, x8b8g8r8, armv6_8888_8888),
> + SIMPLE_NEAREST_FAST_PATH (SRC, x8b8g8r8, x8b8g8r8, armv6_8888_8888),
>
> { PIXMAN_OP_NONE },
> };
For some reason the pixman-arm-simd.c part fails to apply cleanly to
master. I suppose it's just a conflict in context, but I'd like to have
a cleanly applicable patch so that I don't have to munge it and
possibly break something.
The patch itself looks good to me, it's a simple sed job, and I'd push
with my R-b if it applied cleanly.
For reference, the macro PIXMAN_ARM_SIMPLE_NEAREST_FAST_PATH was
originally introduced in:
commit 6e76af0d4b60ab74b309994926f28c532c5af155
Author: Siarhei Siamashka <siarhei.siamashka at nokia.com>
Date: Tue Nov 2 14:26:13 2010 +0200
ARM: macro template in C code to simplify using scaled fast paths
and there it did not have SIMPLE_NEAREST_FAST_PATH_NORMAL as part of
it. It was later added in:
commit aff796d6cee4cb81f0352c2f7d0c994229bd5ca1
Author: Siarhei Siamashka <siarhei.siamashka at gmail.com>
Date: Mon Jun 25 22:36:52 2012 -0400
Add scaled nearest repeat fast paths
Thanks,
pq
More information about the Pixman
mailing list