summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
authorConstantin Musca <constantinx.musca@intel.com>2012-12-10 10:08:12 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-13 15:18:42 +0000
commit24b4976a42bd6eb0e89a555ccfce71931c7c6957 (patch)
tree1b44dffe7e71e7e2bc5ab2d6b616a809bc7863a2 /meta/recipes-graphics
parent009d19a99d61a5601d4fc05956bd366956cd7984 (diff)
downloadpoky-24b4976a42bd6eb0e89a555ccfce71931c7c6957.tar.gz
pixman: upgrade to 0.28.0
* Generic-C-implementation-of-pixman_blt-with-overlapp.patch: - adapted to the new version * enable nativesdk variant (From OE-Core rev: b41e55a7ee226a0ae4efdd633cab94e1cc846525) Signed-off-by: Constantin Musca <constantinx.musca@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman/0002-Generic-C-implementation-of-pixman_blt-with-overlapp.patch127
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman/Generic-C-implementation-of-pixman_blt-with-overlapp.patch124
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman_0.28.0.bb (renamed from meta/recipes-graphics/xorg-lib/pixman_0.27.2.bb)10
3 files changed, 129 insertions, 132 deletions
diff --git a/meta/recipes-graphics/xorg-lib/pixman/0002-Generic-C-implementation-of-pixman_blt-with-overlapp.patch b/meta/recipes-graphics/xorg-lib/pixman/0002-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
deleted file mode 100644
index abd501a106..0000000000
--- a/meta/recipes-graphics/xorg-lib/pixman/0002-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
+++ /dev/null
@@ -1,127 +0,0 @@
1From 211b2bcdb19f86f3868a18520df7dcb4fd122f05 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
3Date: Sun, 19 Aug 2012 14:48:00 +0200
4Subject: [PATCH 2/2] Generic C implementation of pixman_blt with overlapping
5 support
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10This was ported from meta-oe's patch [1]:
11Uses memcpy/memmove functions to copy pixels, can handle the
12case when both source and destination areas are in the same
13image (this is useful for scrolling).
14
15It is assumed that copying direction is only important when
16using the same image for both source and destination (and
17src_stride == dst_stride). Copying direction is undefined
18for the images with different source and destination stride
19which happen to be in the overlapped areas (but this is an
20unrealistic case anyway).
21
22[1] http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-graphics/xorg-lib/pixman-0.26.2/0008-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
23
24Upstream-Status: Unknown - this patch is in meta-oe for a while
25
26Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
27---
28 pixman/pixman-general.c | 21 ++++++++++++++++++---
29 pixman/pixman-private.h | 43 +++++++++++++++++++++++++++++++++++++++++++
30 2 files changed, 61 insertions(+), 3 deletions(-)
31
32diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c
33index d4b2daa..a86b206 100644
34--- a/pixman/pixman-general.c
35+++ b/pixman/pixman-general.c
36@@ -215,9 +215,24 @@ general_blt (pixman_implementation_t *imp,
37 int width,
38 int height)
39 {
40- /* We can't blit unless we have sse2 or mmx */
41-
42- return FALSE;
43+ uint8_t *dst_bytes = (uint8_t *)dst_bits;
44+ uint8_t *src_bytes = (uint8_t *)src_bits;
45+ int bpp;
46+
47+ if (src_bpp != dst_bpp || src_bpp & 7)
48+ return FALSE;
49+
50+ bpp = src_bpp >> 3;
51+ width *= bpp;
52+ src_stride *= 4;
53+ dst_stride *= 4;
54+ pixman_blt_helper (src_bytes + src_y * src_stride + src_x * bpp,
55+ dst_bytes + dest_y * dst_stride + dest_x * bpp,
56+ src_stride,
57+ dst_stride,
58+ width,
59+ height);
60+ return TRUE;
61 }
62
63 static pixman_bool_t
64diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
65index d5e6a72..c77d256 100644
66--- a/pixman/pixman-private.h
67+++ b/pixman/pixman-private.h
68@@ -24,6 +24,7 @@
69
70 #include "pixman.h"
71 #include <time.h>
72+#include <string.h>
73 #include <assert.h>
74 #include <stdio.h>
75 #include <string.h>
76@@ -1096,6 +1097,48 @@ void pixman_timer_register (pixman_timer_t *timer);
77 extern const uint8_t linear_to_srgb[4096];
78 extern const uint16_t srgb_to_linear[256];
79
80+/* a helper function, can blit 8-bit images with src/dst overlapping support */
81+static inline void
82+pixman_blt_helper (uint8_t *src_bytes,
83+ uint8_t *dst_bytes,
84+ int src_stride,
85+ int dst_stride,
86+ int width,
87+ int height)
88+{
89+ /*
90+ * The second part of this check is not strictly needed, but it prevents
91+ * unnecessary upside-down processing of areas which belong to different
92+ * images. Upside-down processing can be slower with fixed-distance-ahead
93+ * prefetch and perceived as having more tearing.
94+ */
95+ if (src_bytes < dst_bytes + width &&
96+ src_bytes + src_stride * height > dst_bytes)
97+ {
98+ src_bytes += src_stride * height - src_stride;
99+ dst_bytes += dst_stride * height - dst_stride;
100+ dst_stride = -dst_stride;
101+ src_stride = -src_stride;
102+ /* Horizontal scrolling to the left needs memmove */
103+ if (src_bytes + width > dst_bytes)
104+ {
105+ while (--height >= 0)
106+ {
107+ memmove (dst_bytes, src_bytes, width);
108+ dst_bytes += dst_stride;
109+ src_bytes += src_stride;
110+ }
111+ return;
112+ }
113+ }
114+ while (--height >= 0)
115+ {
116+ memcpy (dst_bytes, src_bytes, width);
117+ dst_bytes += dst_stride;
118+ src_bytes += src_stride;
119+ }
120+}
121+
122 #endif /* __ASSEMBLER__ */
123
124 #endif /* PIXMAN_PRIVATE_H */
125--
1261.7.4.4
127
diff --git a/meta/recipes-graphics/xorg-lib/pixman/Generic-C-implementation-of-pixman_blt-with-overlapp.patch b/meta/recipes-graphics/xorg-lib/pixman/Generic-C-implementation-of-pixman_blt-with-overlapp.patch
new file mode 100644
index 0000000000..5ac32289e5
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/pixman/Generic-C-implementation-of-pixman_blt-with-overlapp.patch
@@ -0,0 +1,124 @@
1Generic C implementation of pixman_blt with overlapping support
2
3This was ported from meta-oe's patch [1]:
4Uses memcpy/memmove functions to copy pixels, can handle the
5case when both source and destination areas are in the same
6image (this is useful for scrolling).
7
8It is assumed that copying direction is only important when
9using the same image for both source and destination (and
10src_stride == dst_stride). Copying direction is undefined
11for the images with different source and destination stride
12which happen to be in the overlapped areas (but this is an
13unrealistic case anyway).
14
15[1] http://cgit.openembedded.org/meta-openembedded/tree/meta-oe/recipes-graphics/xorg-lib/pixman-0.26.2/0008-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
16
17Upstream-Status: Pending
18Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
19Signed-off-by: Constantin Musca <constantinx.musca@intel.com>
20
21Index: pixman-0.28.0/pixman/pixman-general.c
22===================================================================
23--- pixman-0.28.0.orig/pixman/pixman-general.c
24+++ pixman-0.28.0/pixman/pixman-general.c
25@@ -214,6 +214,41 @@ static const pixman_fast_path_t general_
26 { PIXMAN_OP_NONE }
27 };
28
29+static pixman_bool_t
30+general_blt (pixman_implementation_t *imp,
31+ uint32_t * src_bits,
32+ uint32_t * dst_bits,
33+ int src_stride,
34+ int dst_stride,
35+ int src_bpp,
36+ int dst_bpp,
37+ int src_x,
38+ int src_y,
39+ int dest_x,
40+ int dest_y,
41+ int width,
42+ int height)
43+{
44+ uint8_t *dst_bytes = (uint8_t *)dst_bits;
45+ uint8_t *src_bytes = (uint8_t *)src_bits;
46+ int bpp;
47+
48+ if (src_bpp != dst_bpp || src_bpp & 7)
49+ return FALSE;
50+
51+ bpp = src_bpp >> 3;
52+ width *= bpp;
53+ src_stride *= 4;
54+ dst_stride *= 4;
55+ pixman_blt_helper (src_bytes + src_y * src_stride + src_x * bpp,
56+ dst_bytes + dest_y * dst_stride + dest_x * bpp,
57+ src_stride,
58+ dst_stride,
59+ width,
60+ height);
61+ return TRUE;
62+}
63+
64 pixman_implementation_t *
65 _pixman_implementation_create_general (void)
66 {
67@@ -222,6 +257,7 @@ _pixman_implementation_create_general (v
68 _pixman_setup_combiner_functions_32 (imp);
69 _pixman_setup_combiner_functions_float (imp);
70
71+ imp->blt = general_blt;
72 imp->src_iter_init = general_src_iter_init;
73 imp->dest_iter_init = general_dest_iter_init;
74
75Index: pixman-0.28.0/pixman/pixman-private.h
76===================================================================
77--- pixman-0.28.0.orig/pixman/pixman-private.h
78+++ pixman-0.28.0/pixman/pixman-private.h
79@@ -1109,6 +1109,45 @@ void pixman_timer_register (pixman_timer
80
81 #endif /* PIXMAN_TIMERS */
82
83+/* a helper function, can blit 8-bit images with src/dst overlapping support */
84+static inline void
85+pixman_blt_helper (uint8_t *src_bytes,
86+ uint8_t *dst_bytes,
87+ int src_stride,
88+ int dst_stride,
89+ int width,
90+ int height)
91+{
92+ /*
93+ * The second part of this check is not strictly needed, but it prevents
94+ * unnecessary upside-down processing of areas which belong to different
95+ * images. Upside-down processing can be slower with fixed-distance-ahead
96+ * prefetch and perceived as having more tearing.
97+ */
98+ if (src_bytes < dst_bytes + width &&
99+ src_bytes + src_stride * height > dst_bytes) {
100+ src_bytes += src_stride * height - src_stride;
101+ dst_bytes += dst_stride * height - dst_stride;
102+ dst_stride = -dst_stride;
103+ src_stride = -src_stride;
104+
105+ /* Horizontal scrolling to the left needs memmove */
106+ if (src_bytes + width > dst_bytes) {
107+ while (--height >= 0) {
108+ memmove (dst_bytes, src_bytes, width);
109+ dst_bytes += dst_stride;
110+ src_bytes += src_stride;
111+ }
112+ return;
113+ }
114+ }
115+ while (--height >= 0) {
116+ memcpy (dst_bytes, src_bytes, width);
117+ dst_bytes += dst_stride;
118+ src_bytes += src_stride;
119+ }
120+}
121+
122 #endif /* __ASSEMBLER__ */
123
124 #endif /* PIXMAN_PRIVATE_H */
diff --git a/meta/recipes-graphics/xorg-lib/pixman_0.27.2.bb b/meta/recipes-graphics/xorg-lib/pixman_0.28.0.bb
index 218808a7ec..a3012f9dc0 100644
--- a/meta/recipes-graphics/xorg-lib/pixman_0.27.2.bb
+++ b/meta/recipes-graphics/xorg-lib/pixman_0.28.0.bb
@@ -13,9 +13,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=14096c769ae0cbb5fcb94ec468be11b3 \
13 file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \ 13 file://pixman/pixman-arm-neon-asm.h;endline=24;md5=9a9cc1e51abbf1da58f4d9528ec9d49b \
14 " 14 "
15DEPENDS += "zlib libpng" 15DEPENDS += "zlib libpng"
16BBCLASSEXTEND = "native" 16BBCLASSEXTEND = "native nativesdk"
17 17
18PR = "r2" 18PR = "r0"
19 19
20PE = "1" 20PE = "1"
21 21
@@ -30,7 +30,7 @@ EXTRA_OECONF_class-native = "--disable-gtk"
30 30
31SRC_URI += "\ 31SRC_URI += "\
32 file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \ 32 file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
33 file://0002-Generic-C-implementation-of-pixman_blt-with-overlapp.patch \ 33 file://Generic-C-implementation-of-pixman_blt-with-overlapp.patch \
34" 34"
35SRC_URI[md5sum] = "dd67154b23d88e6a75ad3a83f3052198" 35SRC_URI[md5sum] = "703c3f62437b161c610056e076560570"
36SRC_URI[sha256sum] = "cae9dc13727a84f11beb150c88d3a06ba114f82c52d68073c663c027e099123b" 36SRC_URI[sha256sum] = "6056f9aa0e0578a0492e34fc2ce6dd7bfb181090ed687993c03b969c8cec4828"