summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--recipes/xorg-lib/pixman/0001-ARM-NEON-optimized-pixman_blt.patch104
-rw-r--r--recipes/xorg-lib/pixman/0001-Add-CONVERT_0565_TO_8888-macro.patch27
-rw-r--r--recipes/xorg-lib/pixman/0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch (renamed from recipes/xorg-lib/pixman/0006-Generic-C-implementation-of-pixman_blt-with-overlapp.patch)8
-rw-r--r--recipes/xorg-lib/pixman/0002-Add-CONVERT_8888_TO_8888-and-CONVERT_0565_TO_0565-ma.patch28
-rw-r--r--recipes/xorg-lib/pixman/0002-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch (renamed from recipes/xorg-lib/pixman/0007-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch)4
-rw-r--r--recipes/xorg-lib/pixman/0002-Test-program-for-pixman_blt-function.patch178
-rw-r--r--recipes/xorg-lib/pixman/0003-Add-FAST_PATH_NO_NONE_REPEAT-flag.patch53
-rw-r--r--recipes/xorg-lib/pixman/0003-Generic-C-implementation-of-pixman_blt-with-overlapp.patch114
-rw-r--r--recipes/xorg-lib/pixman/0003-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch (renamed from recipes/xorg-lib/pixman/0008-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch)4
-rw-r--r--recipes/xorg-lib/pixman/0004-Add-FAST_PATH_SAMPLES_COVER_CLIP-and-FAST_PATH_16BIT.patch167
-rw-r--r--recipes/xorg-lib/pixman/0004-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch91
-rw-r--r--recipes/xorg-lib/pixman/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch (renamed from recipes/xorg-lib/pixman/0009-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch)4
-rw-r--r--recipes/xorg-lib/pixman/0005-Add-specialized-fast-nearest-scalers.patch284
-rw-r--r--recipes/xorg-lib/pixman/0005-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch91
-rw-r--r--recipes/xorg-lib/pixman/0006-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch93
-rw-r--r--recipes/xorg-lib/pixman/0041-Fix-filler-bug.patch25
-rw-r--r--recipes/xorg-lib/pixman/0042-Really-fix-filler-bug.patch35
-rw-r--r--recipes/xorg-lib/pixman_git.bb19
18 files changed, 17 insertions, 1312 deletions
diff --git a/recipes/xorg-lib/pixman/0001-ARM-NEON-optimized-pixman_blt.patch b/recipes/xorg-lib/pixman/0001-ARM-NEON-optimized-pixman_blt.patch
deleted file mode 100644
index ed2b68d782..0000000000
--- a/recipes/xorg-lib/pixman/0001-ARM-NEON-optimized-pixman_blt.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From e94b8057370a430eb91b914ed4c0050f72e9fa37 Mon Sep 17 00:00:00 2001
-From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
-Date: Wed, 18 Nov 2009 04:26:18 +0200
-Subject: [PATCH 1/6] ARM: NEON optimized pixman_blt
-
----
- pixman/pixman-arm-neon.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++
- 1 files changed, 67 insertions(+), 0 deletions(-)
-
-diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c
-index 2ed8b4b..495fda4 100644
---- a/pixman/pixman-arm-neon.c
-+++ b/pixman/pixman-arm-neon.c
-@@ -292,6 +292,43 @@ pixman_fill_neon (uint32_t *bits,
- }
- }
-
-+static pixman_bool_t
-+pixman_blt_neon (uint32_t *src_bits,
-+ uint32_t *dst_bits,
-+ int src_stride,
-+ int dst_stride,
-+ int src_bpp,
-+ int dst_bpp,
-+ int src_x,
-+ int src_y,
-+ int dst_x,
-+ int dst_y,
-+ int width,
-+ int height)
-+{
-+ 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);
-+ 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);
-+ return TRUE;
-+ default:
-+ return FALSE;
-+ }
-+}
-+
- static const pixman_fast_path_t arm_neon_fast_path_array[] =
- {
- { PIXMAN_OP_SRC, PIXMAN_r5g6b5, PIXMAN_null, PIXMAN_r5g6b5, neon_composite_src_0565_0565 },
-@@ -361,6 +398,35 @@ arm_neon_composite (pixman_implementation_t *imp,
- }
-
- static pixman_bool_t
-+arm_neon_blt (pixman_implementation_t *imp,
-+ uint32_t * src_bits,
-+ uint32_t * dst_bits,
-+ int src_stride,
-+ int dst_stride,
-+ int src_bpp,
-+ int dst_bpp,
-+ int src_x,
-+ int src_y,
-+ int dst_x,
-+ int dst_y,
-+ int width,
-+ int height)
-+{
-+ if (!pixman_blt_neon (
-+ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
-+ src_x, src_y, dst_x, dst_y, width, height))
-+
-+ {
-+ return _pixman_implementation_blt (
-+ imp->delegate,
-+ src_bits, dst_bits, src_stride, dst_stride, src_bpp, dst_bpp,
-+ src_x, src_y, dst_x, dst_y, width, height);
-+ }
-+
-+ return TRUE;
-+}
-+
-+static pixman_bool_t
- arm_neon_fill (pixman_implementation_t *imp,
- uint32_t * bits,
- int stride,
-@@ -385,6 +451,7 @@ _pixman_implementation_create_arm_neon (void)
- pixman_implementation_t *imp = _pixman_implementation_create (general);
-
- imp->composite = arm_neon_composite;
-+ imp->blt = arm_neon_blt;
- imp->fill = arm_neon_fill;
-
- return imp;
---
-1.6.2.4
-
diff --git a/recipes/xorg-lib/pixman/0001-Add-CONVERT_0565_TO_8888-macro.patch b/recipes/xorg-lib/pixman/0001-Add-CONVERT_0565_TO_8888-macro.patch
deleted file mode 100644
index 4caf6393fc..0000000000
--- a/recipes/xorg-lib/pixman/0001-Add-CONVERT_0565_TO_8888-macro.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From deb3b0ab6a97f4584fe37b3ef708dcad59ceddde Mon Sep 17 00:00:00 2001
-From: Alexander Larsson <alexl@redhat.com>
-Date: Fri, 12 Mar 2010 16:23:42 +0100
-Subject: [PATCH 1/9] Add CONVERT_0565_TO_8888 macro
-
-This lets us simplify some fast paths since we get a consistent
-naming that always has 8888 and gets some value for alpha.
----
- pixman/pixman-private.h | 2 ++
- 1 files changed, 2 insertions(+), 0 deletions(-)
-
-diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
-index 9dcdca7..d0bec39 100644
---- a/pixman/pixman-private.h
-+++ b/pixman/pixman-private.h
-@@ -704,6 +704,8 @@ pixman_region16_copy_from_region32 (pixman_region16_t *dst,
- ((((s) << 5) & 0xfc00) | (((s) >> 1) & 0x300)) | \
- ((((s) << 8) & 0xf80000) | (((s) << 3) & 0x70000)))
-
-+#define CONVERT_0565_TO_8888(s) (CONVERT_0565_TO_0888(s) | 0xff000000)
-+
- #define PIXMAN_FORMAT_IS_WIDE(f) \
- (PIXMAN_FORMAT_A (f) > 8 || \
- PIXMAN_FORMAT_R (f) > 8 || \
---
-1.6.6.1
-
diff --git a/recipes/xorg-lib/pixman/0006-Generic-C-implementation-of-pixman_blt-with-overlapp.patch b/recipes/xorg-lib/pixman/0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
index 8b265c0d74..210cb89c62 100644
--- a/recipes/xorg-lib/pixman/0006-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
+++ b/recipes/xorg-lib/pixman/0001-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
@@ -1,7 +1,7 @@
-From 8d1125fd6a25a0d1d758fd93384bf1baf07bcdf0 Mon Sep 17 00:00:00 2001
+From bf8fb2bf56478c11935dbb33e725f7a25746d347 Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Date: Tue, 16 Mar 2010 16:55:28 +0100
-Subject: [PATCH 6/9] Generic C implementation of pixman_blt with overlapping support
+Subject: [PATCH 1/4] Generic C implementation of pixman_blt with overlapping support
Uses memcpy/memmove functions to copy pixels, can handle the
case when both source and destination areas are in the same
@@ -51,7 +51,7 @@ index bddf79a..f525744 100644
static pixman_bool_t
diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
-index 0cf9113..3478e1b 100644
+index d5767af..eeb677d 100644
--- a/pixman/pixman-private.h
+++ b/pixman/pixman-private.h
@@ -10,6 +10,7 @@
@@ -62,7 +62,7 @@ index 0cf9113..3478e1b 100644
#include <assert.h>
#include <stdio.h>
#include <string.h>
-@@ -866,4 +867,46 @@ void pixman_timer_register (pixman_timer_t *timer);
+@@ -867,4 +868,46 @@ void pixman_timer_register (pixman_timer_t *timer);
#endif /* PIXMAN_TIMERS */
diff --git a/recipes/xorg-lib/pixman/0002-Add-CONVERT_8888_TO_8888-and-CONVERT_0565_TO_0565-ma.patch b/recipes/xorg-lib/pixman/0002-Add-CONVERT_8888_TO_8888-and-CONVERT_0565_TO_0565-ma.patch
deleted file mode 100644
index 871ce75078..0000000000
--- a/recipes/xorg-lib/pixman/0002-Add-CONVERT_8888_TO_8888-and-CONVERT_0565_TO_0565-ma.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 7c2da7f27c2dd04d9ed3db5fd13f1da26cebfa3a Mon Sep 17 00:00:00 2001
-From: Alexander Larsson <alexl@redhat.com>
-Date: Tue, 16 Mar 2010 14:18:29 +0100
-Subject: [PATCH 2/9] Add CONVERT_8888_TO_8888 and CONVERT_0565_TO_0565 macros
-
-These are useful for macroization
----
- pixman/pixman-private.h | 4 ++++
- 1 files changed, 4 insertions(+), 0 deletions(-)
-
-diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
-index d0bec39..bc41249 100644
---- a/pixman/pixman-private.h
-+++ b/pixman/pixman-private.h
-@@ -706,6 +706,10 @@ pixman_region16_copy_from_region32 (pixman_region16_t *dst,
-
- #define CONVERT_0565_TO_8888(s) (CONVERT_0565_TO_0888(s) | 0xff000000)
-
-+/* Trivial versions that are useful in macros */
-+#define CONVERT_8888_TO_8888(s) (s)
-+#define CONVERT_0565_TO_0565(s) (s)
-+
- #define PIXMAN_FORMAT_IS_WIDE(f) \
- (PIXMAN_FORMAT_A (f) > 8 || \
- PIXMAN_FORMAT_R (f) > 8 || \
---
-1.6.6.1
-
diff --git a/recipes/xorg-lib/pixman/0007-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch b/recipes/xorg-lib/pixman/0002-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch
index f9a812e376..110edd5fd5 100644
--- a/recipes/xorg-lib/pixman/0007-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch
+++ b/recipes/xorg-lib/pixman/0002-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch
@@ -1,7 +1,7 @@
-From ac9b18e8aefad1992c3057dc3cf7c309f14544d2 Mon Sep 17 00:00:00 2001
+From 4be9e0fa02f972174efd1788eb92d8fc07d37a53 Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Date: Thu, 22 Oct 2009 05:45:47 +0300
-Subject: [PATCH 7/9] Support of overlapping src/dst for pixman_blt_mmx
+Subject: [PATCH 2/4] Support of overlapping src/dst for pixman_blt_mmx
---
pixman/pixman-mmx.c | 55 +++++++++++++++++++++++++++++---------------------
diff --git a/recipes/xorg-lib/pixman/0002-Test-program-for-pixman_blt-function.patch b/recipes/xorg-lib/pixman/0002-Test-program-for-pixman_blt-function.patch
deleted file mode 100644
index 143e79dabf..0000000000
--- a/recipes/xorg-lib/pixman/0002-Test-program-for-pixman_blt-function.patch
+++ /dev/null
@@ -1,178 +0,0 @@
-From 364406e03f9651aacb1bc684de6c00a27f9df66d Mon Sep 17 00:00:00 2001
-From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
-Date: Mon, 19 Oct 2009 20:32:55 +0300
-Subject: [PATCH 2/6] Test program for pixman_blt function
-
-It can do some basic correctness tests and also check whether
-overlapping of source and destination images is supported.
----
- test/Makefile.am | 2 +
- test/overlapped-blt-test.c | 136 ++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 138 insertions(+), 0 deletions(-)
- create mode 100644 test/overlapped-blt-test.c
-
-diff --git a/test/Makefile.am b/test/Makefile.am
-index 89d32e9..40c305f 100644
---- a/test/Makefile.am
-+++ b/test/Makefile.am
-@@ -9,6 +9,7 @@ TESTPROGRAMS = \
- fetch-test \
- oob-test \
- window-test \
-+ overlapped-blt-test \
- trap-crasher
-
- fetch_test_LDADD = $(TEST_LDADD)
-@@ -17,6 +18,7 @@ composite_LDADD = $(TEST_LDADD)
- trap_crasher_LDADD = $(TEST_LDADD)
- oob_test_LDADD = $(TEST_LDADD)
- window_test_LDADD = $(TEST_LDADD)
-+overlapped_blt_test_LDADD = $(TEST_LDADD)
-
- blitters_test_LDADD = $(TEST_LDADD)
- blitters_test_SOURCES = blitters-test.c utils.c utils.h
-diff --git a/test/overlapped-blt-test.c b/test/overlapped-blt-test.c
-new file mode 100644
-index 0000000..95fbc54
---- /dev/null
-+++ b/test/overlapped-blt-test.c
-@@ -0,0 +1,136 @@
-+/*
-+ * A small test program which can check whether pixman_blt function
-+ * can support overlapping of source and destination images.
-+ * Efficient blit with overlapping is useful for scrolling.
-+ */
-+
-+#include <stdint.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include "pixman.h"
-+
-+/* reference implementation (slow) */
-+static void
-+trivial_copy8_2d (
-+ uint8_t *dst, int dst_stride,
-+ uint8_t *src, int src_stride,
-+ int dx, int dy, int sx, int sy,
-+ int w, int h)
-+{
-+ int x, y;
-+ uint8_t *tmp = malloc (src_stride * (sy + h));
-+ memcpy (tmp, src, src_stride * (sy + h));
-+ for (y = 0; y < h; y++)
-+ {
-+ for (x = 0; x < w; x++)
-+ {
-+ *(dst + (dy + y) * dst_stride + dx + x) =
-+ *(tmp + (sy + y) * src_stride + sx + x);
-+ }
-+ }
-+ free (tmp);
-+}
-+
-+static void
-+trivial_copy_2d (
-+ uint8_t *dst, int dst_stride,
-+ uint8_t *src, int src_stride,
-+ int dx, int dy, int sx, int sy,
-+ int w, int h, int bpp)
-+{
-+ trivial_copy8_2d (dst, dst_stride, src, src_stride,
-+ dx * (bpp / 8), dy, sx * (bpp / 8), sy, w * (bpp / 8), h);
-+}
-+
-+/* now the test itself */
-+
-+#define ST_UNSUPPORTED 1
-+#define ST_NORMAL_BUG 2
-+#define ST_OVERLAPPED_BUG 4
-+
-+#define MAX_SIZE_X 64
-+#define MAX_SIZE_Y 64
-+
-+static void print_result(int bpp, int flags)
-+{
-+ printf("bpp=%d, supported=%d, normal_ok=%d, overlapped_ok=%d\n",
-+ bpp,
-+ !(flags & ST_UNSUPPORTED),
-+ !(flags & ST_NORMAL_BUG),
-+ !(flags & ST_OVERLAPPED_BUG));
-+}
-+
-+int main()
-+{
-+ int c = 100000, r;
-+ int bpp_st[33] = {0};
-+ srand(0);
-+ while (c-- > 0)
-+ {
-+ uint8_t *src1, *src2, *src3;
-+ int i;
-+ int sizex = rand() % MAX_SIZE_X + 1;
-+ int sizey = rand() % MAX_SIZE_Y + 1;
-+ int sx = rand() % sizex;
-+ int sy = rand() % sizey;
-+ int dx = rand() % sizex;
-+ int dy = rand() % sizey;
-+ int w = rand() % sizex;
-+ int h = rand() % sizex;
-+ int bpp = 8 * (1 << (rand() % 3));
-+ int stride_delta = rand() % 8;
-+ int bufsize;
-+ if ((sizex + stride_delta) % 4)
-+ stride_delta += 4 - ((sizex + stride_delta) % 4);
-+ bufsize = (sizex + stride_delta) * sizey * bpp / 8;
-+ src1 = malloc (bufsize);
-+ src2 = malloc (bufsize);
-+ src3 = malloc (bufsize);
-+ for (i = 0; i < bufsize; i++)
-+ src1[i] = rand();
-+ memcpy (src2, src1, bufsize);
-+ memcpy (src3, src1, bufsize);
-+ if (sx + w > sizex)
-+ w = sizex - sx;
-+ if (dx + w > sizex)
-+ w = sizex - dx;
-+ if (sy + h > sizey)
-+ h = sizey - sy;
-+ if (dy + h > sizey)
-+ h = sizey - dy;
-+ /* get reference result */
-+ trivial_copy_2d (src1, (sizex + stride_delta) * bpp / 8,
-+ src1, (sizex + stride_delta) * bpp / 8,
-+ dx, dy, sx, sy, w, h, bpp);
-+ /* check nonoverlapped pixman result */
-+ r = pixman_blt ((uint32_t *)src3, (uint32_t *)src2,
-+ (sizex + stride_delta) * bpp / 8 / 4,
-+ (sizex + stride_delta) * bpp / 8 / 4,
-+ bpp, bpp, sx, sy, dx, dy, w, h);
-+ if (!r)
-+ bpp_st[bpp] |= ST_UNSUPPORTED;
-+ if (memcmp (src1, src2, bufsize) != 0)
-+ bpp_st[bpp] |= ST_NORMAL_BUG;
-+ /* check overlapped pixman result */
-+ r = pixman_blt ((uint32_t *)src3, (uint32_t *)src3,
-+ (sizex + stride_delta) * bpp / 8 / 4,
-+ (sizex + stride_delta) * bpp / 8 / 4,
-+ bpp, bpp, sx, sy, dx, dy, w, h);
-+ if (!r)
-+ bpp_st[bpp] |= ST_UNSUPPORTED;
-+ if (memcmp (src1, src3, bufsize) != 0)
-+ bpp_st[bpp] |= ST_OVERLAPPED_BUG;
-+ /* free buffers */
-+ free (src1);
-+ free (src2);
-+ free (src3);
-+ }
-+
-+ /* report results */
-+ print_result (8, bpp_st[8]);
-+ print_result (16, bpp_st[16]);
-+ print_result (32, bpp_st[32]);
-+
-+ return 0;
-+}
---
-1.6.2.4
-
diff --git a/recipes/xorg-lib/pixman/0003-Add-FAST_PATH_NO_NONE_REPEAT-flag.patch b/recipes/xorg-lib/pixman/0003-Add-FAST_PATH_NO_NONE_REPEAT-flag.patch
deleted file mode 100644
index d9a79985a8..0000000000
--- a/recipes/xorg-lib/pixman/0003-Add-FAST_PATH_NO_NONE_REPEAT-flag.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 6e80b9148a7f43b7b40235a57c1066fe64e371e5 Mon Sep 17 00:00:00 2001
-From: Alexander Larsson <alexl@redhat.com>
-Date: Fri, 12 Mar 2010 15:40:07 +0100
-Subject: [PATCH 3/9] Add FAST_PATH_NO_NONE_REPEAT flag
-
----
- pixman/pixman-image.c | 10 +++++++---
- pixman/pixman-private.h | 1 +
- 2 files changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/pixman/pixman-image.c b/pixman/pixman-image.c
-index d09d193..df5b457 100644
---- a/pixman/pixman-image.c
-+++ b/pixman/pixman-image.c
-@@ -335,16 +335,20 @@ compute_image_info (pixman_image_t *image)
- /* Repeat mode */
- switch (image->common.repeat)
- {
-+ case PIXMAN_REPEAT_NONE:
-+ flags |= FAST_PATH_NO_REFLECT_REPEAT | FAST_PATH_NO_PAD_REPEAT;
-+ break;
-+
- case PIXMAN_REPEAT_REFLECT:
-- flags |= FAST_PATH_NO_PAD_REPEAT;
-+ flags |= FAST_PATH_NO_PAD_REPEAT | FAST_PATH_NO_NONE_REPEAT;
- break;
-
- case PIXMAN_REPEAT_PAD:
-- flags |= FAST_PATH_NO_REFLECT_REPEAT;
-+ flags |= FAST_PATH_NO_REFLECT_REPEAT | FAST_PATH_NO_NONE_REPEAT;
- break;
-
- default:
-- flags |= (FAST_PATH_NO_REFLECT_REPEAT | FAST_PATH_NO_PAD_REPEAT);
-+ flags |= FAST_PATH_NO_REFLECT_REPEAT | FAST_PATH_NO_PAD_REPEAT | FAST_PATH_NO_NONE_REPEAT;
- break;
- }
-
-diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
-index bc41249..65314b9 100644
---- a/pixman/pixman-private.h
-+++ b/pixman/pixman-private.h
-@@ -579,6 +579,7 @@ _pixman_choose_implementation (void);
- #define FAST_PATH_SIMPLE_REPEAT (1 << 12)
- #define FAST_PATH_IS_OPAQUE (1 << 13)
- #define FAST_PATH_NEEDS_WORKAROUND (1 << 14)
-+#define FAST_PATH_NO_NONE_REPEAT (1 << 15)
-
- #define _FAST_PATH_STANDARD_FLAGS \
- (FAST_PATH_ID_TRANSFORM | \
---
-1.6.6.1
-
diff --git a/recipes/xorg-lib/pixman/0003-Generic-C-implementation-of-pixman_blt-with-overlapp.patch b/recipes/xorg-lib/pixman/0003-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
deleted file mode 100644
index 25ce7ee3b8..0000000000
--- a/recipes/xorg-lib/pixman/0003-Generic-C-implementation-of-pixman_blt-with-overlapp.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From c29c9fa826b7112156fd6150b5f1564227935c05 Mon Sep 17 00:00:00 2001
-From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
-Date: Thu, 22 Oct 2009 05:27:33 +0300
-Subject: [PATCH 3/6] Generic C implementation of pixman_blt with overlapping support
-
-Uses memcpy/memmove functions to copy pixels, can handle the
-case when both source and destination areas are in the same
-image (this is useful for scrolling).
-
-It is assumed that copying direction is only important when
-using the same image for both source and destination (and
-src_stride == dst_stride). Copying direction is undefined
-for the images with different source and destination stride
-which happen to be in the overlapped areas (but this is an
-unrealistic case anyway).
----
- pixman/pixman-general.c | 21 ++++++++++++++++++---
- pixman/pixman-private.h | 43 +++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 61 insertions(+), 3 deletions(-)
-
-diff --git a/pixman/pixman-general.c b/pixman/pixman-general.c
-index c96a3f9..d71a299 100644
---- a/pixman/pixman-general.c
-+++ b/pixman/pixman-general.c
-@@ -300,9 +300,24 @@ general_blt (pixman_implementation_t *imp,
- int width,
- int height)
- {
-- /* We can't blit unless we have sse2 or mmx */
--
-- return FALSE;
-+ uint8_t *dst_bytes = (uint8_t *)dst_bits;
-+ uint8_t *src_bytes = (uint8_t *)src_bits;
-+ int bpp;
-+
-+ if (src_bpp != dst_bpp || src_bpp & 7)
-+ return FALSE;
-+
-+ bpp = src_bpp >> 3;
-+ width *= bpp;
-+ src_stride *= 4;
-+ dst_stride *= 4;
-+ pixman_blt_helper (src_bytes + src_y * src_stride + src_x * bpp,
-+ dst_bytes + dst_y * dst_stride + dst_x * bpp,
-+ src_stride,
-+ dst_stride,
-+ width,
-+ height);
-+ return TRUE;
- }
-
- static pixman_bool_t
-diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
-index 5000f91..8c5d4fd 100644
---- a/pixman/pixman-private.h
-+++ b/pixman/pixman-private.h
-@@ -10,6 +10,7 @@
-
- #include "pixman.h"
- #include <time.h>
-+#include <string.h>
- #include <assert.h>
-
- #include "pixman-compiler.h"
-@@ -794,4 +795,46 @@ void pixman_timer_register (pixman_timer_t *timer);
-
- #endif /* PIXMAN_TIMERS */
-
-+/* a helper function, can blit 8-bit images with src/dst overlapping support */
-+static inline void
-+pixman_blt_helper (uint8_t *src_bytes,
-+ uint8_t *dst_bytes,
-+ int src_stride,
-+ int dst_stride,
-+ int width,
-+ int height)
-+{
-+ /*
-+ * The second part of this check is not strictly needed, but it prevents
-+ * unnecessary upside-down processing of areas which belong to different
-+ * images. Upside-down processing can be slower with fixed-distance-ahead
-+ * prefetch and perceived as having more tearing.
-+ */
-+ if (src_bytes < dst_bytes + width &&
-+ 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;
-+ /* Horizontal scrolling to the left needs memmove */
-+ if (src_bytes + width > dst_bytes)
-+ {
-+ while (--height >= 0)
-+ {
-+ memmove (dst_bytes, src_bytes, width);
-+ dst_bytes += dst_stride;
-+ src_bytes += src_stride;
-+ }
-+ return;
-+ }
-+ }
-+ while (--height >= 0)
-+ {
-+ memcpy (dst_bytes, src_bytes, width);
-+ dst_bytes += dst_stride;
-+ src_bytes += src_stride;
-+ }
-+}
-+
- #endif /* PIXMAN_PRIVATE_H */
---
-1.6.2.4
-
diff --git a/recipes/xorg-lib/pixman/0008-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch b/recipes/xorg-lib/pixman/0003-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch
index 5b311fe81f..ae27f38cf0 100644
--- a/recipes/xorg-lib/pixman/0008-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch
+++ b/recipes/xorg-lib/pixman/0003-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch
@@ -1,7 +1,7 @@
-From f6d6ad1063e29a95bad4c4a2e43f3ecf90344ef7 Mon Sep 17 00:00:00 2001
+From 1a29e4029250b4adb52061a68e94c84523e785e2 Mon Sep 17 00:00:00 2001
From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
Date: Thu, 22 Oct 2009 05:45:54 +0300
-Subject: [PATCH 8/9] Support of overlapping src/dst for pixman_blt_sse2
+Subject: [PATCH 3/4] Support of overlapping src/dst for pixman_blt_sse2
---
pixman/pixman-sse2.c | 55 +++++++++++++++++++++++++++++--------------------
diff --git a/recipes/xorg-lib/pixman/0004-Add-FAST_PATH_SAMPLES_COVER_CLIP-and-FAST_PATH_16BIT.patch b/recipes/xorg-lib/pixman/0004-Add-FAST_PATH_SAMPLES_COVER_CLIP-and-FAST_PATH_16BIT.patch
deleted file mode 100644
index eb388475d9..0000000000
--- a/recipes/xorg-lib/pixman/0004-Add-FAST_PATH_SAMPLES_COVER_CLIP-and-FAST_PATH_16BIT.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-From 8e7e8e3f96b094616f37fdf8a35043d7c5f64417 Mon Sep 17 00:00:00 2001
-From: Alexander Larsson <alexl@redhat.com>
-Date: Fri, 12 Mar 2010 15:41:01 +0100
-Subject: [PATCH 4/9] Add FAST_PATH_SAMPLES_COVER_CLIP and FAST_PATH_16BIT_SAFE
-
-FAST_PATH_SAMPLES_COVER_CLIP:
-
-This is set of the source sample grid, unrepeated but transformed
-completely completely covers the clip destination. If this is set
-you can use a simple scaled that doesn't have to care about the repeat
-mode.
-
-FAST_PATH_16BIT_SAFE:
-
-This signifies two things:
-1) The size of the src/mask fits in a 16.16 fixed point, so something like:
-
- max_vx = src_image->bits.width << 16;
-
- Is allowed and is guaranteed to not overflow max_vx
-
-2) When stepping the source space we're guaranteed to never overflow
- a 16.16 bit fix point variable, even if we step one extra step
- in the destination space. This means that a loop doing:
-
- x = vx >> 16;
- vx += unit_x; d = src_row[x];
-
- will never overflow vx causing x to be negative.
-
- And additionally, if you track vx like above and apply NORMAL repeat
- after the vx addition with something like:
-
- while (vx >= max_vx) vx -= max_vx;
-
- This will never overflow the vx even on the final increment that
- takes vx one past the end of where we will read, which makes the
- repeat loop safe.
----
- pixman/pixman-private.h | 2 +
- pixman/pixman.c | 84 +++++++++++++++++++++++++++++++++++++---------
- 2 files changed, 69 insertions(+), 17 deletions(-)
-
-diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
-index 65314b9..0cf9113 100644
---- a/pixman/pixman-private.h
-+++ b/pixman/pixman-private.h
-@@ -580,6 +580,8 @@ _pixman_choose_implementation (void);
- #define FAST_PATH_IS_OPAQUE (1 << 13)
- #define FAST_PATH_NEEDS_WORKAROUND (1 << 14)
- #define FAST_PATH_NO_NONE_REPEAT (1 << 15)
-+#define FAST_PATH_SAMPLES_COVER_CLIP (1 << 16)
-+#define FAST_PATH_16BIT_SAFE (1 << 17)
-
- #define _FAST_PATH_STANDARD_FLAGS \
- (FAST_PATH_ID_TRANSFORM | \
-diff --git a/pixman/pixman.c b/pixman/pixman.c
-index c71617e..e967e34 100644
---- a/pixman/pixman.c
-+++ b/pixman/pixman.c
-@@ -479,24 +479,75 @@ walk_region_internal (pixman_implementation_t *imp,
- }
- }
-
--static force_inline pixman_bool_t
--image_covers (pixman_image_t *image,
-- pixman_box32_t *extents,
-- int x,
-- int y)
-+#define IS_16BIT(x) (((x) >= INT16_MIN) && ((x) <= INT16_MAX))
-+
-+static force_inline uint32_t
-+compute_src_extents_flags (pixman_image_t *image,
-+ pixman_box32_t *extents,
-+ int x,
-+ int y)
- {
-- if (image->common.type == BITS &&
-- image->common.repeat == PIXMAN_REPEAT_NONE)
-+ pixman_box16_t extents16;
-+ uint32_t flags;
-+
-+ flags = FAST_PATH_COVERS_CLIP;
-+
-+ if (image->common.type != BITS)
-+ return flags;
-+
-+ if (image->common.repeat == PIXMAN_REPEAT_NONE &&
-+ (x > extents->x1 || y > extents->y1 ||
-+ x + image->bits.width < extents->x2 ||
-+ y + image->bits.height < extents->y2))
-+ {
-+ flags &= ~FAST_PATH_COVERS_CLIP;
-+ }
-+
-+ if (IS_16BIT (extents->x1 - x) &&
-+ IS_16BIT (extents->y1 - y) &&
-+ IS_16BIT (extents->x2 - x) &&
-+ IS_16BIT (extents->y2 - y))
- {
-- if (x > extents->x1 || y > extents->y1 ||
-- x + image->bits.width < extents->x2 ||
-- y + image->bits.height < extents->y2)
-+ extents16.x1 = extents->x1 - x;
-+ extents16.y1 = extents->y1 - y;
-+ extents16.x2 = extents->x2 - x;
-+ extents16.y2 = extents->y2 - y;
-+
-+ if (!image->common.transform ||
-+ pixman_transform_bounds (image->common.transform, &extents16))
- {
-- return FALSE;
-+ if (extents16.x1 >= 0 && extents16.y1 >= 0 &&
-+ extents16.x2 <= image->bits.width &&
-+ extents16.y2 <= image->bits.height)
-+ {
-+ flags |= FAST_PATH_SAMPLES_COVER_CLIP;
-+ }
- }
- }
-
-- return TRUE;
-+ if (IS_16BIT (extents->x1 - x - 1) &&
-+ IS_16BIT (extents->y1 - y - 1) &&
-+ IS_16BIT (extents->x2 - x + 1) &&
-+ IS_16BIT (extents->y2 - y + 1))
-+ {
-+ extents16.x1 = extents->x1 - x - 1;
-+ extents16.y1 = extents->y1 - y - 1;
-+ extents16.x2 = extents->x2 - x + 1;
-+ extents16.y2 = extents->y2 - y + 1;
-+
-+ if (/* src space expanded by one in dest space fits in 16 bit */
-+ (!image->common.transform ||
-+ pixman_transform_bounds (image->common.transform, &extents16)) &&
-+ /* And src image size can be used as 16.16 fixed point */
-+ image->bits.width < 0x7fff &&
-+ image->bits.height < 0x7fff)
-+ {
-+ /* Then we're "16bit safe" */
-+ flags |= FAST_PATH_16BIT_SAFE;
-+ }
-+ }
-+
-+ return flags;
- }
-
- static void
-@@ -581,11 +632,10 @@ do_composite (pixman_implementation_t *imp,
-
- extents = pixman_region32_extents (&region);
-
-- if (image_covers (src, extents, dest_x - src_x, dest_y - src_y))
-- src_flags |= FAST_PATH_COVERS_CLIP;
--
-- if (mask && image_covers (mask, extents, dest_x - mask_x, dest_y - mask_y))
-- mask_flags |= FAST_PATH_COVERS_CLIP;
-+ src_flags |= compute_src_extents_flags (src, extents, dest_x - src_x, dest_y - src_y);
-+
-+ if (mask)
-+ mask_flags |= compute_src_extents_flags (mask, extents, dest_x - mask_x, dest_y - mask_y);
-
- /*
- * Check if we can replace our operator by a simpler one
---
-1.6.6.1
-
diff --git a/recipes/xorg-lib/pixman/0004-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch b/recipes/xorg-lib/pixman/0004-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch
deleted file mode 100644
index 74c7b45bc4..0000000000
--- a/recipes/xorg-lib/pixman/0004-Support-of-overlapping-src-dst-for-pixman_blt_mmx.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 7ca32542c957ff308a6ca7e3715e6552a65ae395 Mon Sep 17 00:00:00 2001
-From: Siarhei Siamashka <siarhei.siamashka@nokia.com>
-Date: Thu, 22 Oct 2009 05:45:47 +0300
-Subject: [PATCH 4/6] Support of overlapping src/dst for pixman_blt_mmx
-
----
- pixman/pixman-mmx.c | 55 +++++++++++++++++++++++++++++---------------------
- 1 files changed, 32 insertions(+), 23 deletions(-)
-
-diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c
-index 819e3a0..dcccadb 100644
---- a/pixman/pixman-mmx.c
-+++ b/pixman/pixman-mmx.c
-@@ -3002,34 +3002,43 @@ pixman_blt_mmx (uint32_t *src_bits,
- {
- uint8_t * src_bytes;
- uint8_t * dst_bytes;
-- int byte_width;
-+ int bpp;
-
-- if (src_bpp != dst_bpp)
-+ if (src_bpp != dst_bpp || src_bpp & 7)
- return FALSE;
-
-- if (src_bpp == 16)
-- {
-- src_stride = src_stride * (int) sizeof (uint32_t) / 2;
-- dst_stride = dst_stride * (int) sizeof (uint32_t) / 2;
-- src_bytes = (uint8_t *)(((uint16_t *)src_bits) + src_stride * (src_y) + (src_x));
-- dst_bytes = (uint8_t *)(((uint16_t *)dst_bits) + dst_stride * (dst_y) + (dst_x));
-- byte_width = 2 * width;
-- src_stride *= 2;
-- dst_stride *= 2;
-- }
-- else if (src_bpp == 32)
-+ 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)
- {
-- src_stride = src_stride * (int) sizeof (uint32_t) / 4;
-- dst_stride = dst_stride * (int) sizeof (uint32_t) / 4;
-- src_bytes = (uint8_t *)(((uint32_t *)src_bits) + src_stride * (src_y) + (src_x));
-- dst_bytes = (uint8_t *)(((uint32_t *)dst_bits) + dst_stride * (dst_y) + (dst_x));
-- byte_width = 4 * width;
-- src_stride *= 4;
-- dst_stride *= 4;
-+ pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride,
-+ width, height);
-+ return TRUE;
- }
-- else
-+
-+ if (src_bytes < dst_bytes && src_bytes + src_stride * height > dst_bytes)
- {
-- return FALSE;
-+ 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 MMX */
-+ while (--height >= 0)
-+ {
-+ memmove (dst_bytes, src_bytes, width);
-+ dst_bytes += dst_stride;
-+ src_bytes += src_stride;
-+ }
-+ return TRUE;
-+ }
- }
-
- while (height--)