summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/xorg-lib/pixman
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-12-04 15:35:41 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-12-05 14:25:28 +0000
commitd8efb8db01bcfe662a9f42ae2eb5f2c4dd9cce87 (patch)
treeaaf7c0045bbc935e846cae3bbd881538d4950217 /meta/recipes-graphics/xorg-lib/pixman
parent7df2cfcfa47993f8bf641691a20b1da1fd363ca4 (diff)
downloadpoky-d8efb8db01bcfe662a9f42ae2eb5f2c4dd9cce87.tar.gz
pixman: upgrade to 0.32.4
Drop the generic C implementation of pixman_blt patch, upstream refuses to accept generic implementations as the policy is that the caller provides generic paths, and this patch was only used in conjunction with a matching patch in xserver-xorg which we don't carry anymore. (From OE-Core rev: 3a5931736e95a2edbb19349b21103b19614a7c30) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-graphics/xorg-lib/pixman')
-rw-r--r--meta/recipes-graphics/xorg-lib/pixman/Generic-C-implementation-of-pixman_blt-with-overlapp.patch124
1 files changed, 0 insertions, 124 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 */