From: Siarhei Siamashka Date: Wed, 4 Nov 2009 13:29:27 +0000 (+0200) Subject: ARM: enabled new implementation for pixman_fill_neon X-Git-Tag: 1.0_branch~730 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dcfade3df96559ce942df5d16b7915c94f7d9e57;p=profile%2Fivi%2Fpixman.git ARM: enabled new implementation for pixman_fill_neon --- diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c index 9052061..494f06c 100644 --- a/pixman/pixman-arm-neon.c +++ b/pixman/pixman-arm-neon.c @@ -33,6 +33,27 @@ #include #include "pixman-private.h" +void +pixman_composite_src_n_8_asm_neon (int32_t w, + int32_t h, + uint8_t *dst, + int32_t dst_stride, + uint8_t src); + +void +pixman_composite_src_n_0565_asm_neon (int32_t w, + int32_t h, + uint16_t *dst, + int32_t dst_stride, + uint16_t src); + +void +pixman_composite_src_n_8888_asm_neon (int32_t w, + int32_t h, + uint32_t *dst, + int32_t dst_stride, + uint32_t src); + static pixman_bool_t pixman_fill_neon (uint32_t *bits, int stride, @@ -43,7 +64,38 @@ pixman_fill_neon (uint32_t *bits, int height, uint32_t _xor) { - return FALSE; + /* stride is always multiple of 32bit units in pixman */ + uint32_t byte_stride = stride * sizeof(uint32_t); + + switch (bpp) + { + case 8: + pixman_composite_src_n_8_asm_neon ( + width, + height, + (uint8_t *)(((char *) bits) + y * byte_stride + x), + byte_stride, + _xor & 0xff); + return TRUE; + case 16: + pixman_composite_src_n_0565_asm_neon ( + width, + height, + (uint16_t *)(((char *) bits) + y * byte_stride + x * 2), + byte_stride / 2, + _xor & 0xffff); + return TRUE; + case 32: + pixman_composite_src_n_8888_asm_neon ( + width, + height, + (uint32_t *)(((char *) bits) + y * byte_stride + x * 4), + byte_stride / 4, + _xor); + return TRUE; + default: + return FALSE; + } } static const pixman_fast_path_t arm_neon_fast_path_array[] =