diff options
author | Koen Kooi <koen@openembedded.org> | 2010-05-23 11:53:47 +0200 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-05-23 11:53:47 +0200 |
commit | a018d190495f51b31f3b577026d3cd196c229c6f (patch) | |
tree | 4c830c4cc4d5a9b01d5f4c58df5c53a6e0a4976f /recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch | |
parent | 104b91c471125482eb83893425fb031557e892b4 (diff) | |
download | openembedded-a018d190495f51b31f3b577026d3cd196c229c6f.tar.gz |
pixman 0.18.0: add NEON fix
pixman 0.18.2: add recipe and rediff patches, make default for angstrom
Diffstat (limited to 'recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch')
-rw-r--r-- | recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch | 94 |
1 files changed, 94 insertions, 0 deletions
diff --git a/recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch b/recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch new file mode 100644 index 0000000000..d56fd99c6f --- /dev/null +++ b/recipes/xorg-lib/pixman-0.18.2/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch @@ -0,0 +1,94 @@ +From 80c1eae677a6ea10d67bb7328230626cd8fce08e Mon Sep 17 00:00:00 2001 +From: Siarhei Siamashka <siarhei.siamashka@nokia.com> +Date: Wed, 18 Nov 2009 06:08:48 +0200 +Subject: [PATCH 4/7] Support of overlapping src/dst for pixman_blt_neon + +--- + pixman/pixman-arm-neon.c | 62 +++++++++++++++++++++++++++++++++++++-------- + 1 files changed, 51 insertions(+), 11 deletions(-) + +diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c +index 6808b36..7feee1d 100644 +--- a/pixman/pixman-arm-neon.c ++++ b/pixman/pixman-arm-neon.c +@@ -168,26 +168,66 @@ pixman_blt_neon (uint32_t *src_bits, + int width, + int height) + { +- if (src_bpp != dst_bpp) ++ uint8_t * src_bytes; ++ uint8_t * dst_bytes; ++ int bpp; ++ ++ if (src_bpp != dst_bpp || src_bpp & 7) + return FALSE; + ++ bpp = src_bpp >> 3; ++ width *= bpp; ++ src_stride *= 4; ++ dst_stride *= 4; ++ src_bytes = (uint8_t *)src_bits + src_y * src_stride + src_x * bpp; ++ dst_bytes = (uint8_t *)dst_bits + dst_y * dst_stride + dst_x * bpp; ++ ++ if (src_bpp != 16 && src_bpp != 32) ++ { ++ pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride, ++ width, height); ++ return TRUE; ++ } ++ ++ if (src_bytes < dst_bytes && src_bytes + src_stride * height > dst_bytes) ++ { ++ src_bytes += src_stride * height - src_stride; ++ dst_bytes += dst_stride * height - dst_stride; ++ dst_stride = -dst_stride; ++ src_stride = -src_stride; ++ ++ if (src_bytes + width > dst_bytes) ++ { ++ /* TODO: reverse scanline copy using NEON */ ++ while (--height >= 0) ++ { ++ memmove (dst_bytes, src_bytes, width); ++ dst_bytes += dst_stride; ++ src_bytes += src_stride; ++ } ++ return TRUE; ++ } ++ } ++ + switch (src_bpp) + { + case 16: + pixman_composite_src_0565_0565_asm_neon ( +- width, height, +- (uint16_t *)(((char *) dst_bits) + +- dst_y * dst_stride * 4 + dst_x * 2), dst_stride * 2, +- (uint16_t *)(((char *) src_bits) + +- src_y * src_stride * 4 + src_x * 2), src_stride * 2); ++ width >> 1, ++ height, ++ (uint16_t *) dst_bytes, ++ dst_stride >> 1, ++ (uint16_t *) src_bytes, ++ src_stride >> 1); + return TRUE; + case 32: + pixman_composite_src_8888_8888_asm_neon ( +- width, height, +- (uint32_t *)(((char *) dst_bits) + +- dst_y * dst_stride * 4 + dst_x * 4), dst_stride, +- (uint32_t *)(((char *) src_bits) + +- src_y * src_stride * 4 + src_x * 4), src_stride); ++ width >> 2, ++ height, ++ (uint32_t *) dst_bytes, ++ dst_stride >> 2, ++ (uint32_t *) src_bytes, ++ src_stride >> 2); + return TRUE; + default: + return FALSE; +-- +1.6.6.1 + |