aboutsummaryrefslogtreecommitdiff
path: root/pixman/test
diff options
context:
space:
mode:
Diffstat (limited to 'pixman/test')
-rw-r--r--pixman/test/blitters-test.c9
-rw-r--r--pixman/test/composite.c17
-rw-r--r--pixman/test/fetch-test.c10
-rw-r--r--pixman/test/stress-test.c2
4 files changed, 32 insertions, 6 deletions
diff --git a/pixman/test/blitters-test.c b/pixman/test/blitters-test.c
index 5a867f23a..5b9180f66 100644
--- a/pixman/test/blitters-test.c
+++ b/pixman/test/blitters-test.c
@@ -88,8 +88,11 @@ 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)
+ if (PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_BGRA ||
+ PIXMAN_FORMAT_TYPE (fmt) == PIXMAN_TYPE_RGBA)
+ {
mask <<= (PIXMAN_FORMAT_BPP (fmt) - PIXMAN_FORMAT_DEPTH (fmt));
+ }
for (i = 0; i < 32; i++)
mask |= mask << (i * PIXMAN_FORMAT_BPP (fmt));
@@ -182,6 +185,8 @@ static pixman_format_code_t img_fmt_list[] = {
PIXMAN_x8b8g8r8,
PIXMAN_b8g8r8a8,
PIXMAN_b8g8r8x8,
+ PIXMAN_r8g8b8a8,
+ PIXMAN_r8g8b8x8,
PIXMAN_x14r6g6b6,
PIXMAN_r8g8b8,
PIXMAN_b8g8r8,
@@ -412,6 +417,6 @@ main (int argc, const char *argv[])
}
return fuzzer_test_main("blitters", 2000000,
- 0x1DB8BDF8,
+ 0x265CDFEB,
test_composite, argc, argv);
}
diff --git a/pixman/test/composite.c b/pixman/test/composite.c
index 5e486708d..ea10f8a6e 100644
--- a/pixman/test/composite.c
+++ b/pixman/test/composite.c
@@ -102,6 +102,8 @@ static const format_t formats[] =
P(x8b8g8r8),
P(b8g8r8a8),
P(b8g8r8x8),
+ P(r8g8b8a8),
+ P(r8g8b8x8),
P(x2r10g10b10),
P(x2b10g10r10),
P(a2r10g10b10),
@@ -556,6 +558,13 @@ get_pixel (pixman_image_t *image,
bs = g + gs;
break;
+ case PIXMAN_TYPE_RGBA:
+ as = 0;
+ bs = PIXMAN_FORMAT_BPP (format) - (b + g + r);
+ gs = b + bs;
+ rs = g + gs;
+ break;
+
case PIXMAN_TYPE_A:
as = 0;
rs = 0;
@@ -900,13 +909,13 @@ main (int argc, char **argv)
#ifdef USE_OPENMP
# pragma omp parallel for default(none) shared(result, argv, seed)
#endif
- for (i = seed; i <= N_TESTS; ++i)
+ for (i = 0; i <= N_TESTS; ++i)
{
- if (!result && !run_test (i))
+ if (!result && !run_test (i + seed))
{
- printf ("Test 0x%08X failed.\n", i);
+ printf ("Test 0x%08X failed.\n", seed + i);
- result = i;
+ result = seed + i;
}
}
diff --git a/pixman/test/fetch-test.c b/pixman/test/fetch-test.c
index 4554f9f9b..cbb1ee63e 100644
--- a/pixman/test/fetch-test.c
+++ b/pixman/test/fetch-test.c
@@ -34,6 +34,16 @@ static testcase_t testcases[] =
NULL,
},
{
+ PIXMAN_r8g8b8a8,
+ 2, 2,
+ 8,
+ { 0x11223300, 0x55667744,
+ 0x99aabb88, 0xddeeffcc },
+ { 0x00112233, 0x44556677,
+ 0x8899aabb, 0xccddeeff },
+ NULL,
+ },
+ {
PIXMAN_g1,
8, 2,
4,
diff --git a/pixman/test/stress-test.c b/pixman/test/stress-test.c
index c694bde8c..92b5f0bca 100644
--- a/pixman/test/stress-test.c
+++ b/pixman/test/stress-test.c
@@ -19,6 +19,8 @@ static const pixman_format_code_t image_formats[] =
PIXMAN_x8b8g8r8,
PIXMAN_b8g8r8a8,
PIXMAN_b8g8r8x8,
+ PIXMAN_r8g8b8a8,
+ PIXMAN_r8g8b8x8,
PIXMAN_x14r6g6b6,
PIXMAN_r8g8b8,
PIXMAN_b8g8r8,