aboutsummaryrefslogtreecommitdiff
path: root/pixman/test
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-10-05 15:13:41 +0000
committermarha <marha@users.sourceforge.net>2009-10-05 15:13:41 +0000
commit78db264e7992131e0781bdfa5ede821305262b2d (patch)
tree7461ae9dab5bf69f056250fc233c1ada393dc957 /pixman/test
parent1d2fa791e7eb383cf2818bb2e33da546edbeade9 (diff)
parent77a4732b0637493966889fe3545966fdc12a1b5e (diff)
downloadvcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.gz
vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.tar.bz2
vcxsrv-78db264e7992131e0781bdfa5ede821305262b2d.zip
svn merge https://vcxsrv.svn.sourceforge.net/svnroot/vcxsrv/branches/released .
Diffstat (limited to 'pixman/test')
-rw-r--r--pixman/test/blitters-test.c5
-rw-r--r--pixman/test/fetch-test.c18
2 files changed, 21 insertions, 2 deletions
diff --git a/pixman/test/blitters-test.c b/pixman/test/blitters-test.c
index 23de6c2f5..ba9900a79 100644
--- a/pixman/test/blitters-test.c
+++ b/pixman/test/blitters-test.c
@@ -314,6 +314,9 @@ free_random_image (uint32_t initcrc,
uint32_t *data = pixman_image_get_data (img);
uint32_t mask = (1 << PIXMAN_FORMAT_DEPTH (fmt)) - 1;
+ if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA)
+ mask <<= (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt));
+
for (i = 0; i < 32; i++)
mask |= mask << (i * PIXMAN_FORMAT_BPP (fmt));
@@ -637,7 +640,7 @@ main (int argc, char *argv[])
/* Predefined value for running with all the fastpath functions
disabled. It needs to be updated every time when changes are
introduced to this program or behavior of pixman changes! */
- if (crc == 0xFE1244BF)
+ if (crc == 0x06D8EDB6)
{
printf ("blitters test passed\n");
}
diff --git a/pixman/test/fetch-test.c b/pixman/test/fetch-test.c
index c41f1a63e..6306a4c42 100644
--- a/pixman/test/fetch-test.c
+++ b/pixman/test/fetch-test.c
@@ -2,6 +2,7 @@
#include <stdlib.h>
#include <stdio.h>
#include "pixman.h"
+#include <config.h>
#define SIZE 1024
@@ -34,8 +35,13 @@ testcase_t testcases[] = {
.format = PIXMAN_g1,
.width = 8, .height = 2,
.stride = 4,
+#ifdef WORDS_BIGENDIAN
+ .src = { 0xaa000000,
+ 0x55000000 },
+#else
.src = { 0x00000055,
0x000000aa },
+#endif
.dst = { 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000,
0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff, 0x00000000, 0x00ffffff },
.indexed = &mono_pallete,
@@ -51,14 +57,24 @@ testcase_t testcases[] = {
0x00898989, 0x00ababab, 0x00cdcdcd, 0x00efefef, },
},
#endif
+ /* FIXME: make this work on big endian */
{
.format = PIXMAN_yv12,
.width = 8, .height = 2,
.stride = 8,
+#ifdef WORDS_BIGENDIAN
+ .src = { 0x00ff00ff, 0x00ff00ff,
+ 0xff00ff00, 0xff00ff00,
+ 0x80ff8000,
+ 0x800080ff
+ },
+#else
.src = { 0xff00ff00, 0xff00ff00,
0x00ff00ff, 0x00ff00ff,
0x0080ff80,
- 0xff800080},
+ 0xff800080
+ },
+#endif
.dst = {
0xff000000, 0xffffffff, 0xffb80000, 0xffffe113,
0xff000000, 0xffffffff, 0xff0023ee, 0xff4affff,