diff options
author | Koen Kooi <koen@openembedded.org> | 2010-03-17 18:33:39 +0100 |
---|---|---|
committer | Koen Kooi <koen@openembedded.org> | 2010-03-17 18:34:12 +0100 |
commit | 6c5f9d4325be253fb3cb9b6d3bec11f7a7a13562 (patch) | |
tree | 5603f511926a6f23f0ee942abc60d62686449e82 /recipes/xorg-lib/pixman | |
parent | 76dc5ff734746a9d3106affd8afe10adb6118381 (diff) |
pixman git: remove patches that were applied upstream
Diffstat (limited to 'recipes/xorg-lib/pixman')
17 files changed, 10 insertions, 1300 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 (®ion); - -- 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--) -@@ -3039,7 +3048,7 @@ pixman_blt_mmx (uint32_t *src_bits, - uint8_t *d = dst_bytes; - src_bytes += src_stride; - dst_bytes += dst_stride; -- w = byte_width; -+ w = width; - - while (w >= 2 && ((unsigned long)d & 3)) - { --- -1.6.2.4 - diff --git a/recipes/xorg-lib/pixman/0009-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch b/recipes/xorg-lib/pixman/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch index ae7b043194..3dcba178ef 100644 --- a/recipes/xorg-lib/pixman/0009-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch +++ b/recipes/xorg-lib/pixman/0004-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch @@ -1,7 +1,7 @@ -From 41572ca5aa9e50e4d1000b3da1e6ee43c6f4088a Mon Sep 17 00:00:00 2001 +From 6d52bc4c8f4f29643a3353deb9cb06769e2f0186 Mon Sep 17 00:00:00 2001 From: Siarhei Siamashka <siarhei.siamashka@nokia.com> Date: Wed, 18 Nov 2009 06:08:48 +0200 -Subject: [PATCH 9/9] Support of overlapping src/dst for pixman_blt_neon +Subject: [PATCH 4/4] Support of overlapping src/dst for pixman_blt_neon --- pixman/pixman-arm-neon.c | 62 +++++++++++++++++++++++++++++++++++++-------- diff --git a/recipes/xorg-lib/pixman/0005-Add-specialized-fast-nearest-scalers.patch b/recipes/xorg-lib/pixman/0005-Add-specialized-fast-nearest-scalers.patch deleted file mode 100644 index 962b4e03e2..0000000000 --- a/recipes/xorg-lib/pixman/0005-Add-specialized-fast-nearest-scalers.patch +++ /dev/null @@ -1,284 +0,0 @@ -From def20085302693c032e81456d975454acd356acd Mon Sep 17 00:00:00 2001 -From: Alexander Larsson <alexl@redhat.com> -Date: Fri, 12 Mar 2010 15:45:04 +0100 -Subject: [PATCH 5/9] Add specialized fast nearest scalers - -This is a macroized version of SRC/OVER repeat normal/unneeded nearest -neighbour scaling instantiated for some common 8888 and 565 formats. - -Based on work by Siarhei Siamashka ---- - pixman/pixman-fast-path.c | 243 +++++++++++++++++++++++++++++++++++++++++++++ - 1 files changed, 243 insertions(+), 0 deletions(-) - -diff --git a/pixman/pixman-fast-path.c b/pixman/pixman-fast-path.c -index 4d26b0f..6607a47 100644 ---- a/pixman/pixman-fast-path.c -+++ b/pixman/pixman-fast-path.c -@@ -27,6 +27,7 @@ - #include <config.h> - #endif - #include <string.h> -+#include <stdlib.h> - #include "pixman-private.h" - #include "pixman-combine32.h" - -@@ -1373,6 +1374,208 @@ repeat (pixman_repeat_t repeat, int *c, int size) - return TRUE; - } - -+/* A macroified version of specialized nearest scalers for some -+ * common 8888 and 565 formats. It supports SRC and OVER ops. -+ * -+ * There are two repeat versions, one that handles repeat normal, -+ * and one without repeat handling that only works if the src region -+ * used is completely covered by the pre-repeated source samples. -+ * -+ * The loops are unrolled to process two pixels per iteration for better -+ * performance on most CPU architectures (superscalar processors -+ * can issue several operations simultaneously, other processors can hide -+ * instructions latencies by pipelining operations). Unrolling more -+ * does not make much sense because the compiler will start running out -+ * of spare registers soon. -+ */ -+ -+#define GET_8888_ALPHA(s) ((s) >> 24) -+ /* This is not actually used since we don't have an OVER with -+ 565 source, but it is needed to build. */ -+#define GET_0565_ALPHA(s) 0xff -+ -+#define FAST_NEAREST(scale_func_name, SRC_FORMAT, DST_FORMAT, \ -+ src_type_t, dst_type_t, OP, do_repeat) \ -+static void \ -+fast_composite_scaled_nearest_ ## scale_func_name ## _ ## OP (pixman_implementation_t *imp, \ -+ pixman_op_t op, \ -+ pixman_image_t * src_image, \ -+ pixman_image_t * mask_image, \ -+ pixman_image_t * dst_image, \ -+ int32_t src_x, \ -+ int32_t src_y, \ -+ int32_t mask_x, \ -+ int32_t mask_y, \ -+ int32_t dst_x, \ -+ int32_t dst_y, \ -+ int32_t width, \ -+ int32_t height) \ -+{ \ -+ dst_type_t *dst_line; \ -+ src_type_t *src_first_line; \ -+ uint32_t d; \ -+ src_type_t s1, s2; \ -+ uint8_t a1, a2; \ -+ int w; \ -+ int x1, x2, y; \ -+ pixman_fixed_t orig_vx; \ -+ pixman_fixed_t max_vx, max_vy; \ -+ pixman_vector_t v; \ -+ pixman_fixed_t vx, vy; \ -+ pixman_fixed_t unit_x, unit_y; \ -+ \ -+ src_type_t *src; \ -+ dst_type_t *dst; \ -+ int src_stride, dst_stride; \ -+ \ -+ if (PIXMAN_OP_ ## OP != PIXMAN_OP_SRC && PIXMAN_OP_ ## OP != PIXMAN_OP_OVER) \ -+ abort(); \ -+ \ -+ PIXMAN_IMAGE_GET_LINE (dst_image, dst_x, dst_y, dst_type_t, dst_stride, dst_line, 1); \ -+ /* pass in 0 instead of src_x and src_y because src_x and src_y need to be \ -+ * transformed from destination space to source space */ \ -+ PIXMAN_IMAGE_GET_LINE (src_image, 0, 0, src_type_t, src_stride, src_first_line, 1); \ -+ \ -+ /* reference point is the center of the pixel */ \ -+ v.vector[0] = pixman_int_to_fixed (src_x) + pixman_fixed_1 / 2; \ -+ v.vector[1] = pixman_int_to_fixed (src_y) + pixman_fixed_1 / 2; \ -+ v.vector[2] = pixman_fixed_1; \ -+ \ -+ if (!pixman_transform_point_3d (src_image->common.transform, &v)) \ -+ return; \ -+ \ -+ unit_x = src_image->common.transform->matrix[0][0]; \ -+ unit_y = src_image->common.transform->matrix[1][1]; \ -+ \ -+ /* Round down to closest integer, ensuring that 0.5 rounds to 0, not 1 */ \ -+ v.vector[0] -= pixman_fixed_e; \ -+ v.vector[1] -= pixman_fixed_e; \ -+ \ -+ vx = v.vector[0]; \ -+ vy = v.vector[1]; \ -+ \ -+ if (do_repeat) \ -+ { \ -+ /* Clamp repeating positions inside the actual samples */ \ -+ max_vx = src_image->bits.width << 16; \ -+ max_vy = src_image->bits.height << 16; \ -+ \ -+ repeat (PIXMAN_REPEAT_NORMAL, &vx, max_vx); \ -+ repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); \ -+ } \ -+ \ -+ orig_vx = vx; \ -+ \ -+ while (--height >= 0) \ -+ { \ -+ dst = dst_line; \ -+ dst_line += dst_stride; \ -+ \ -+ y = vy >> 16; \ -+ vy += unit_y; \ -+ if (do_repeat) \ -+ repeat (PIXMAN_REPEAT_NORMAL, &vy, max_vy); \ -+ \ -+ src = src_first_line + src_stride * y; \ -+ \ -+ w = width; \ -+ vx = orig_vx; \ -+ while ((w -= 2) >= 0) \ -+ { \ -+ x1 = vx >> 16; \ -+ vx += unit_x; \ -+ if (do_repeat) \ -+ repeat (PIXMAN_REPEAT_NORMAL, &vx, max_vx); \ -+ s1 = src[x1]; \ -+ \ -+ x2 = vx >> 16; \ -+ vx += unit_x; \ -+ if (do_repeat) \ -+ repeat (PIXMAN_REPEAT_NORMAL, &vx, max_vx); \ -+ s2 = src[x2]; \ -+ \ -+ if (PIXMAN_OP_ ## OP == PIXMAN_OP_OVER) \ -+ { \ -+ a1 = GET_ ## SRC_FORMAT ## _ALPHA(s1); \ -+ a2 = GET_ ## SRC_FORMAT ## _ALPHA(s2); \ -+ \ -+ if (a1 == 0xff) \ -+ { \ -+ *dst = CONVERT_ ## SRC_FORMAT ## _TO_ ## DST_FORMAT (s1); \ -+ } \ -+ else if (s1) \ -+ { \ -+ d = CONVERT_## DST_FORMAT ## _TO_8888 (*dst); \ -+ a1 ^= 0xff; \ -+ UN8x4_MUL_UN8_ADD_UN8x4 (d, a1, s1); \ -+ *dst = CONVERT_8888_TO_ ## DST_FORMAT (d); \ -+ } \ -+ dst++; \ -+ \ -+ if (a2 == 0xff) \ -+ { \ -+ *dst = CONVERT_ ## SRC_FORMAT ## _TO_ ## DST_FORMAT (s2); \ -+ } \ -+ else if (s2) \ -+ { \ -+ d = CONVERT_## DST_FORMAT ## _TO_8888 (*dst); \ -+ a2 ^= 0xff; \ -+ UN8x4_MUL_UN8_ADD_UN8x4 (d, a2, s2); \ -+ *dst = CONVERT_8888_TO_ ## DST_FORMAT (d); \ -+ } \ -+ dst++; \ -+ } \ -+ else /* PIXMAN_OP_SRC */ \ -+ { \ -+ *dst++ = CONVERT_ ## SRC_FORMAT ## _TO_ ## DST_FORMAT (s1); \ -+ *dst++ = CONVERT_ ## SRC_FORMAT ## _TO_ ## DST_FORMAT (s2); \ -+ } \ -+ } \ -+ \ -+ if (w & 1) \ -+ { \ -+ x1 = vx >> 16; \ -+ vx += unit_x; \ -+ if (do_repeat) \ -+ repeat (PIXMAN_REPEAT_NORMAL, &vx, max_vx); \ -+ s1 = src[x1]; \ -+ \ -+ if (PIXMAN_OP_ ## OP == PIXMAN_OP_OVER) \ -+ { \ -+ a1 = GET_ ## SRC_FORMAT ## _ALPHA(s1); \ -+ \ -+ if (a1 == 0xff) \ -+ { \ -+ *dst = CONVERT_ ## SRC_FORMAT ## _TO_ ## DST_FORMAT (s1); \ -+ } \ -+ else if (s1) \ -+ { \ -+ d = CONVERT_## DST_FORMAT ## _TO_8888 (*dst); \ -+ a1 ^= 0xff; \ -+ UN8x4_MUL_UN8_ADD_UN8x4 (d, a1, s1); \ -+ *dst = CONVERT_8888_TO_ ## DST_FORMAT (d); \ -+ } \ -+ dst++; \ -+ } \ -+ else /* PIXMAN_OP_SRC */ \ -+ { \ -+ *dst++ = CONVERT_ ## SRC_FORMAT ## _TO_ ## DST_FORMAT (s1); \ -+ } \ -+ } \ -+ } \ -+} -+ -+FAST_NEAREST(x888_x888_none, 8888, 8888, uint32_t, uint32_t, SRC, /*repeat: */ 0); -+FAST_NEAREST(x888_x888_normal, 8888, 8888, uint32_t, uint32_t, SRC, /*repeat: */ 1); -+FAST_NEAREST(x888_x888_none, 8888, 8888, uint32_t, uint32_t, OVER, /*repeat: */ 0); -+FAST_NEAREST(x888_x888_normal, 8888, 8888, uint32_t, uint32_t, OVER, /*repeat: */ 1); -+FAST_NEAREST(x888_565_none, 8888, 0565, uint32_t, uint16_t, SRC, /*repeat: */ 0); -+FAST_NEAREST(x888_565_normal, 8888, 0565, uint32_t, uint16_t, SRC, /*repeat: */ 1); -+FAST_NEAREST(565_565_none, 0565, 0565, uint16_t, uint16_t, SRC, /*repeat: */ 0); -+FAST_NEAREST(565_565_normal, 0565, 0565, uint16_t, uint16_t, SRC, /*repeat: */ 1); -+FAST_NEAREST(8888_565_none, 8888, 0565, uint32_t, uint16_t, OVER, /*repeat: */ 0); -+FAST_NEAREST(8888_565_normal, 8888, 0565, uint32_t, uint16_t, OVER, /*repeat: */ 1); -+ - static force_inline uint32_t - fetch_nearest (pixman_repeat_t src_repeat, - pixman_format_code_t format, -@@ -1595,6 +1798,46 @@ static const pixman_fast_path_t c_fast_paths[] = - FAST_PATH_NO_ACCESSORS | \ - FAST_PATH_NO_WIDE_FORMAT) - -+#define HAS_NORMAL_REPEAT_FLAGS \ -+ (FAST_PATH_NO_REFLECT_REPEAT | \ -+ FAST_PATH_NO_PAD_REPEAT | \ -+ FAST_PATH_NO_NONE_REPEAT) -+ -+#define SIMPLE_NEAREST_FAST_PATH(op,s,d,func) \ -+ { PIXMAN_OP_ ## op, \ -+ PIXMAN_ ## s, \ -+ SCALED_NEAREST_FLAGS | HAS_NORMAL_REPEAT_FLAGS | FAST_PATH_16BIT_SAFE, \ -+ PIXMAN_null, 0, \ -+ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ -+ fast_composite_scaled_nearest_ ## func ## _normal ## _ ## op, \ -+ }, \ -+ { PIXMAN_OP_ ## op, \ -+ PIXMAN_ ## s, \ -+ SCALED_NEAREST_FLAGS | FAST_PATH_SAMPLES_COVER_CLIP, \ -+ PIXMAN_null, 0, \ -+ PIXMAN_ ## d, FAST_PATH_STD_DEST_FLAGS, \ -+ fast_composite_scaled_nearest_ ## func ## _none ## _ ## op, \ -+ } -+ SIMPLE_NEAREST_FAST_PATH (SRC, x8r8g8b8, x8r8g8b8, x888_x888), -+ SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, x8r8g8b8, x888_x888), -+ SIMPLE_NEAREST_FAST_PATH (SRC, x8b8g8r8, x8b8g8r8, x888_x888), -+ SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, x8b8g8r8, x888_x888), -+ -+ SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, a8r8g8b8, x888_x888), -+ SIMPLE_NEAREST_FAST_PATH (SRC, a8b8g8r8, a8b8g8r8, x888_x888), -+ -+ SIMPLE_NEAREST_FAST_PATH (SRC, x8r8g8b8, r5g6b5, x888_565), -+ SIMPLE_NEAREST_FAST_PATH (SRC, a8r8g8b8, r5g6b5, x888_565), -+ -+ SIMPLE_NEAREST_FAST_PATH (SRC, r5g6b5, r5g6b5, 565_565), -+ -+ SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, x8r8g8b8, x888_x888), -+ SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, x8b8g8r8, x888_x888), -+ SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, a8r8g8b8, x888_x888), -+ SIMPLE_NEAREST_FAST_PATH (OVER, a8b8g8r8, a8b8g8r8, x888_x888), -+ -+ SIMPLE_NEAREST_FAST_PATH (OVER, a8r8g8b8, r5g6b5, 8888_565), -+ - #define NEAREST_FAST_PATH(op,s,d) \ - { PIXMAN_OP_ ## op, \ - PIXMAN_ ## s, SCALED_NEAREST_FLAGS, \ --- -1.6.6.1 - diff --git a/recipes/xorg-lib/pixman/0005-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch b/recipes/xorg-lib/pixman/0005-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch deleted file mode 100644 index 3704fbf1cf..0000000000 --- a/recipes/xorg-lib/pixman/0005-Support-of-overlapping-src-dst-for-pixman_blt_sse2.patch +++ /dev/null @@ -1,91 +0,0 @@ -From edc80b41c6480b7c80ec5f7c835c92b2debb3774 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 5/6] Support of overlapping src/dst for pixman_blt_sse2 - ---- - pixman/pixman-sse2.c | 55 +++++++++++++++++++++++++++++-------------------- - 1 files changed, 32 insertions(+), 23 deletions(-) - -diff --git a/pixman/pixman-sse2.c b/pixman/pixman-sse2.c -index 78b0ad1..b84636b 100644 ---- a/pixman/pixman-sse2.c -+++ b/pixman/pixman-sse2.c -@@ -5300,34 +5300,43 @@ pixman_blt_sse2 (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 SSE2 */ -+ while (--height >= 0) -+ { -+ memmove (dst_bytes, src_bytes, width); -+ dst_bytes += dst_stride; -+ src_bytes += src_stride; -+ } -+ return TRUE; -+ } - } - - cache_prefetch ((__m128i*)src_bytes); -@@ -5340,7 +5349,7 @@ pixman_blt_sse2 (uint32_t *src_bits, - uint8_t *d = dst_bytes; - src_bytes += src_stride; - dst_bytes += dst_stride; -- w = byte_width; -+ w = width; - - cache_prefetch_next ((__m128i*)s); - cache_prefetch_next ((__m128i*)d); --- -1.6.2.4 - diff --git a/recipes/xorg-lib/pixman/0006-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch b/recipes/xorg-lib/pixman/0006-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch deleted file mode 100644 index af75716bb8..0000000000 --- a/recipes/xorg-lib/pixman/0006-Support-of-overlapping-src-dst-for-pixman_blt_neon.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 86870ff530b5e435034bd80207e5758466d96cff Mon Sep 17 00:00:00 2001 -From: Siarhei Siamashka <siarhei.siamashka@nokia.com> -Date: Wed, 18 Nov 2009 06:08:48 +0200 -Subject: [PATCH 6/6] Support of overlapping src/dst for pixman_blt_neon - ---- - pixman/pixman-arm-neon.c | 63 ++++++++++++++++++++++++++++++++++++++------- - 1 files changed, 53 insertions(+), 10 deletions(-) - -diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c -index 495fda4..c632ff5 100644 ---- a/pixman/pixman-arm-neon.c -+++ b/pixman/pixman-arm-neon.c -@@ -306,23 +306,66 @@ pixman_blt_neon (uint32_t *src_bits, - int width, - int height) - { -+ uint8_t * src_bytes; -+ uint8_t * dst_bytes; -+ int bpp; -+ -+ if (src_bpp != dst_bpp || src_bpp & 7) -+ return FALSE; -+ -+ 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) -+ { -+ pixman_blt_helper (src_bytes, dst_bytes, src_stride, dst_stride, -+ width, height); -+ return TRUE; -+ } -+ -+ if (src_bytes < dst_bytes && 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; -+ -+ if (src_bytes + width > dst_bytes) -+ { -+ /* TODO: reverse scanline copy using NEON */ -+ while (--height >= 0) -+ { -+ memmove (dst_bytes, src_bytes, width); -+ dst_bytes += dst_stride; -+ src_bytes += src_stride; -+ } -+ return TRUE; -+ } -+ } -+ - 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); -+ width >> 1, -+ height, -+ (uint16_t *) dst_bytes, -+ dst_stride >> 1, -+ (uint16_t *) src_bytes, -+ src_stride >> 1); - 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); -+ width >> 2, -+ height, -+ (uint32_t *) dst_bytes, -+ dst_stride >> 2, -+ (uint32_t *) src_bytes, -+ src_stride >> 2); - return TRUE; - default: - return FALSE; --- -1.6.2.4 - diff --git a/recipes/xorg-lib/pixman/0041-Fix-filler-bug.patch b/recipes/xorg-lib/pixman/0041-Fix-filler-bug.patch deleted file mode 100644 index 02bd13a0db..0000000000 --- a/recipes/xorg-lib/pixman/0041-Fix-filler-bug.patch +++ /dev/null @@ -1,25 +0,0 @@ -From 82ea3295e435b49478cf7943100b22286baf47dc Mon Sep 17 00:00:00 2001 -From: Jonathan Morton <jmorton@sd070.hel.movial.fi> -Date: Thu, 4 Jun 2009 10:43:41 +0300 -Subject: [PATCH] Fix filler bug. - ---- - pixman/pixman-arm-neon.c | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c -index 18e9a16..67f0b63 100644 ---- a/pixman/pixman-arm-neon.c -+++ b/pixman/pixman-arm-neon.c -@@ -1377,7 +1377,7 @@ pixman_fill_neon (uint32_t *bits, - "beq 2f\n" - "strh %[color], [r4]!\n" - "2:\n" -- "tst r5, #1\n" -+ "tst %[width], #1\n" - "beq 2f\n" - "strb %[color], [r4]!\n" - "2:\n" --- -1.5.6.3 - diff --git a/recipes/xorg-lib/pixman/0042-Really-fix-filler-bug.patch b/recipes/xorg-lib/pixman/0042-Really-fix-filler-bug.patch deleted file mode 100644 index e23b9cd133..0000000000 --- a/recipes/xorg-lib/pixman/0042-Really-fix-filler-bug.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 5cdd43ac753780ef2cfd6adde822af5dcba6091f Mon Sep 17 00:00:00 2001 -From: Jonathan Morton <jmorton@sd070.hel.movial.fi> -Date: Thu, 4 Jun 2009 15:11:40 +0300 -Subject: [PATCH] Really fix filler bug. - ---- - pixman/pixman-arm-neon.c | 6 +++--- - 1 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/pixman/pixman-arm-neon.c b/pixman/pixman-arm-neon.c -index cfb69f4..0c05f64 100644 ---- a/pixman/pixman-arm-neon.c -+++ b/pixman/pixman-arm-neon.c -@@ -1369,15 +1369,15 @@ pixman_fill_neon (uint32_t *bits, - "2:\n" - "tst %[width], #4\n" - "beq 2f\n" -- "str %[color], [r4]!\n" -+ "str %[color], [r4], #4\n" - "2:\n" - "tst %[width], #2\n" - "beq 2f\n" -- "strh %[color], [r4]!\n" -+ "strh %[color], [r4], #2\n" - "2:\n" - "tst %[width], #1\n" - "beq 2f\n" -- "strb %[color], [r4]!\n" -+ "strb %[color], [r4], #1\n" - "2:\n" - - "subs %[height], %[height], #1\n" --- -1.5.6.3 - |