diff options
-rw-r--r-- | pixman/pixman-arm-neon.c | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c index 722738a..9bff31e 100644 --- a/pixman/pixman-arm-neon.c +++ b/pixman/pixman-arm-neon.c @@ -124,6 +124,38 @@ ARM_BIND_FAST_PATH_SRC_MASK_DST (neon, over_8888_8888_8888, uint32_t, 1, uint32_ ARM_BIND_FAST_PATH_SRC_MASK_DST (neon, over_8888_8_0565, uint32_t, 1, uint8_t, 1, uint16_t, 1) ARM_BIND_FAST_PATH_SRC_MASK_DST (neon, over_0565_8_0565, uint16_t, 1, uint8_t, 1, uint16_t, 1) +/* Opacity fast path functions. */ +ARM_BIND_FAST_PATH_N_OPACITY_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, over_n_0565, uint16_t, 1) +ARM_BIND_FAST_PATH_N_OPACITY_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, over_n_8888, uint32_t, 1) +ARM_BIND_FAST_PATH_N_OPACITY_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, over_reverse_n_8888, uint32_t, 1) +ARM_BIND_FAST_PATH_N_OPACITY_DST (0, neon, in_n_8, uint8_t, 1) + +ARM_BIND_FAST_PATH_N_OPACITY_MASK_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, over_n_8_0565, uint8_t, 1, uint16_t, 1) +ARM_BIND_FAST_PATH_N_OPACITY_MASK_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, over_n_8_8888, uint8_t, 1, uint32_t, 1) +ARM_BIND_FAST_PATH_N_OPACITY_MASK_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, over_n_8888_8888_ca, uint32_t, 1, uint32_t, 1) +ARM_BIND_FAST_PATH_N_OPACITY_MASK_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, over_n_8888_0565_ca, uint32_t, 1, uint16_t, 1) +ARM_BIND_FAST_PATH_N_OPACITY_MASK_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, over_n_8_8, uint8_t, 1, uint8_t, 1) +ARM_BIND_FAST_PATH_N_OPACITY_MASK_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, add_n_8_8, uint8_t, 1, uint8_t, 1) +ARM_BIND_FAST_PATH_N_OPACITY_MASK_DST ((SKIP_ZERO_SRC | SKIP_ZERO_OPACITY), + neon, add_n_8_8888, uint8_t, 1, uint32_t, 1) + +ARM_BIND_FAST_PATH_SRC_OPACITY_N_DST ((SKIP_ZERO_MASK | SKIP_ZERO_OPACITY), + neon, over_8888_n_8888, uint32_t, 1, uint32_t, 1) +ARM_BIND_FAST_PATH_SRC_OPACITY_N_DST ((SKIP_ZERO_MASK | SKIP_ZERO_OPACITY), + neon, over_8888_n_0565, uint32_t, 1, uint16_t, 1) +ARM_BIND_FAST_PATH_SRC_OPACITY_N_DST ((SKIP_ZERO_MASK | SKIP_ZERO_OPACITY), + neon, over_0565_n_0565, uint16_t, 1, uint16_t, 1) +ARM_BIND_FAST_PATH_SRC_OPACITY_N_DST ((SKIP_ZERO_MASK | SKIP_ZERO_OPACITY), + neon, add_8888_n_8888, uint32_t, 1, uint32_t, 1) /* Nearest/bilinear scanline function declarations. */ ARM_SCANLINE_FUNC_SCALED_NEAREST_SRC_DST (neon, 8888_8888, OVER, uint32_t, uint32_t) @@ -278,6 +310,12 @@ pixman_blt_neon (uint32_t *src_bits, } } +#define ARM_NEON_OPACITY_FAST_PATH(op, src, mask, dst, func) \ + PIXMAN_OPACITY_FAST_PATH (op, src, mask, dst, neon_composite_opacity_##func) + +#define ARM_NEON_OPACITY_FAST_PATH_CA(op, src, mask, dst, func) \ + PIXMAN_OPACITY_FAST_PATH_CA (op, src, mask, dst, neon_composite_opacity_##func) + static const pixman_fast_path_t arm_neon_fast_paths[] = { PIXMAN_STD_FAST_PATH (SRC, r5g6b5, null, r5g6b5, neon_composite_src_0565_0565), @@ -366,6 +404,37 @@ static const pixman_fast_path_t arm_neon_fast_paths[] = PIXMAN_STD_FAST_PATH (OUT_REVERSE, a8, null, a8r8g8b8, neon_composite_out_reverse_8_8888), PIXMAN_STD_FAST_PATH (OUT_REVERSE, a8, null, a8b8g8r8, neon_composite_out_reverse_8_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, a8, a8, over_n_8_8), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, a8, r5g6b5, over_n_8_0565), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, a8, b5g6r5, over_n_8_0565), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, a8, a8r8g8b8, over_n_8_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, a8, x8r8g8b8, over_n_8_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, a8, a8b8g8r8, over_n_8_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, a8, x8b8g8r8, over_n_8_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, null, r5g6b5, over_n_0565), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, null, a8r8g8b8, over_n_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER, solid, null, x8r8g8b8, over_n_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER, a8r8g8b8, solid, a8r8g8b8, over_8888_n_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER, a8r8g8b8, solid, x8r8g8b8, over_8888_n_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER, a8r8g8b8, solid, r5g6b5, over_8888_n_0565), + ARM_NEON_OPACITY_FAST_PATH (OVER, a8b8g8r8, solid, b5g6r5, over_8888_n_0565), + ARM_NEON_OPACITY_FAST_PATH (OVER, r5g6b5, solid, r5g6b5, over_0565_n_0565), + ARM_NEON_OPACITY_FAST_PATH (OVER, b5g6r5, solid, b5g6r5, over_0565_n_0565), + ARM_NEON_OPACITY_FAST_PATH (ADD, solid, a8, a8, add_n_8_8), + ARM_NEON_OPACITY_FAST_PATH (ADD, solid, a8, a8r8g8b8, add_n_8_8888), + ARM_NEON_OPACITY_FAST_PATH (ADD, solid, a8, a8b8g8r8, add_n_8_8888), + ARM_NEON_OPACITY_FAST_PATH (ADD, a8r8g8b8, solid, a8r8g8b8, add_8888_n_8888), + ARM_NEON_OPACITY_FAST_PATH (ADD, a8b8g8r8, solid, a8b8g8r8, add_8888_n_8888), + ARM_NEON_OPACITY_FAST_PATH (IN, solid, null, a8, in_n_8), + ARM_NEON_OPACITY_FAST_PATH (OVER_REVERSE, solid, null, a8r8g8b8, over_reverse_n_8888), + ARM_NEON_OPACITY_FAST_PATH (OVER_REVERSE, solid, null, a8b8g8r8, over_reverse_n_8888), + ARM_NEON_OPACITY_FAST_PATH_CA (OVER, solid, a8r8g8b8, a8r8g8b8, over_n_8888_8888_ca), + ARM_NEON_OPACITY_FAST_PATH_CA (OVER, solid, a8r8g8b8, x8r8g8b8, over_n_8888_8888_ca), + ARM_NEON_OPACITY_FAST_PATH_CA (OVER, solid, a8b8g8r8, a8b8g8r8, over_n_8888_8888_ca), + ARM_NEON_OPACITY_FAST_PATH_CA (OVER, solid, a8b8g8r8, x8b8g8r8, over_n_8888_8888_ca), + ARM_NEON_OPACITY_FAST_PATH_CA (OVER, solid, a8r8g8b8, r5g6b5, over_n_8888_0565_ca), + ARM_NEON_OPACITY_FAST_PATH_CA (OVER, solid, a8b8g8r8, b5g6r5, over_n_8888_0565_ca), + 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), |