summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>2009-11-04 15:29:27 +0200
committerSiarhei Siamashka <siarhei.siamashka@nokia.com>2009-11-11 18:12:56 +0200
commitdcfade3df96559ce942df5d16b7915c94f7d9e57 (patch)
treed3486c53e5d8fe86d15c4a666ee47e14f40e7214
parentbcb4bc79321659635d706bade25851cddf563856 (diff)
ARM: enabled new implementation for pixman_fill_neon
-rw-r--r--pixman/pixman-arm-neon.c54
1 files changed, 53 insertions, 1 deletions
diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
index 90520616..494f06c7 100644
--- a/pixman/pixman-arm-neon.c
+++ b/pixman/pixman-arm-neon.c
@@ -33,6 +33,27 @@
#include <string.h>
#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[] =