libdmx: Add fso-specs to DEPENDS
[openembedded.git] / recipes / xorg-lib / pixman-0.17.8 / 0006-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch
blob7c22483a2ef2b23f97786272408a3f9c9298dc0e
1 From 86870ff530b5e435034bd80207e5758466d96cff Mon Sep 17 00:00:00 2001
2 From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
3 Date: Wed, 18 Nov 2009 06:08:48 +0200
4 Subject: [PATCH 6/6] Support of overlapping src/dst for pixman_blt_neon
6 ---
7 pixman/pixman-arm-neon.c | 63 ++++++++++++++++++++++++++++++++++++++-------
8 1 files changed, 53 insertions(+), 10 deletions(-)
10 diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
11 index 495fda4..c632ff5 100644
12 --- a/pixman/pixman-arm-neon.c
13 +++ b/pixman/pixman-arm-neon.c
14 @@ -357,26 +357,66 @@
15 int width,
16 int height)
18 - if (src_bpp != dst_bpp)
19 + uint8_t * src_bytes;
20 + uint8_t * dst_bytes;
21 + int bpp;
23 + if (src_bpp != dst_bpp || src_bpp & 7)
24 return FALSE;
26 + bpp = src_bpp >> 3;
27 + width *= bpp;
28 + src_stride *= 4;
29 + dst_stride *= 4;
30 + src_bytes = (uint8_t *)src_bits + src_y * src_stride + src_x * bpp;
31 + dst_bytes = (uint8_t *)dst_bits + dst_y * dst_stride + dst_x * bpp;
33 + if (src_bpp != 16 && src_bpp != 32)
34 + {
35 + pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride,
36 + width, height);
37 + return TRUE;
38 + }
40 + if (src_bytes < dst_bytes && src_bytes + src_stride * height > dst_bytes)
41 + {
42 + src_bytes += src_stride * height - src_stride;
43 + dst_bytes += dst_stride * height - dst_stride;
44 + dst_stride = -dst_stride;
45 + src_stride = -src_stride;
47 + if (src_bytes + width > dst_bytes)
48 + {
49 + /* TODO: reverse scanline copy using NEON */
50 + while (--height >= 0)
51 + {
52 + memmove (dst_bytes, src_bytes, width);
53 + dst_bytes += dst_stride;
54 + src_bytes += src_stride;
55 + }
56 + return TRUE;
57 + }
58 + }
60 switch (src_bpp)
62 case 16:
63 pixman_composite_src_0565_0565_asm_neon (
64 - width, height,
65 - (uint16_t *)(((char *) dst_bits) +
66 - dst_y * dst_stride * 4 + dst_x * 2), dst_stride * 2,
67 - (uint16_t *)(((char *) src_bits) +
68 - src_y * src_stride * 4 + src_x * 2), src_stride * 2);
69 + width >> 1,
70 + height,
71 + (uint16_t *) dst_bytes,
72 + dst_stride >> 1,
73 + (uint16_t *) src_bytes,
74 + src_stride >> 1);
75 return TRUE;
76 case 32:
77 pixman_composite_src_8888_8888_asm_neon (
78 - width, height,
79 - (uint32_t *)(((char *) dst_bits) +
80 - dst_y * dst_stride * 4 + dst_x * 4), dst_stride,
81 - (uint32_t *)(((char *) src_bits) +
82 - src_y * src_stride * 4 + src_x * 4), src_stride);
83 + width >> 2,
84 + height,
85 + (uint32_t *) dst_bytes,
86 + dst_stride >> 2,
87 + (uint32_t *) src_bytes,
88 + src_stride >> 2);
89 return TRUE;
90 default:
91 return FALSE;
92 --
93 1.6.2.4