summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-lib
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/xorg-lib')
-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.32.4.bb (renamed from meta/recipes-graphics/xorg-lib/pixman_0.30.2.bb)5
2 files changed, 2 insertions, 127 deletions
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
deleted file mode 100644
index 5ac32289e5..0000000000
--- a/meta/recipes-graphics/xorg-lib/pixman/Generic-C-implementation-of-pixman_blt-with-overlapp.patch
+++ /dev/null
@@ -1,124 +0,0 @@
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.30.2.bb b/meta/recipes-graphics/xorg-lib/pixman_0.32.4.bb
index 36d9b2d277..d1f3df7f9c 100644
--- a/meta/recipes-graphics/xorg-lib/pixman_0.30.2.bb
+++ b/meta/recipes-graphics/xorg-lib/pixman_0.32.4.bb
@@ -29,8 +29,7 @@ EXTRA_OECONF_class-native = "--disable-gtk"
29 29
30SRC_URI += "\ 30SRC_URI += "\
31 file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \ 31 file://0001-ARM-qemu-related-workarounds-in-cpu-features-detecti.patch \
32 file://Generic-C-implementation-of-pixman_blt-with-overlapp.patch \
33" 32"
34 33
35SRC_URI[md5sum] = "2d0588e20dc1308b29b2fca68dad9a9c" 34SRC_URI[md5sum] = "cdb566504fe9daf6728c7b03cc7ea228"
36SRC_URI[sha256sum] = "4fbb51788fe7cbd8abb5f80aed95ec878704e57a06328f7bebe0306e3822c96c" 35SRC_URI[sha256sum] = "ae2bd664057e330d41b40336ed296d3512318ce7f2401cc42601f2613d371e4c"