test: add alloc@zpos-4x-domino-partial

This is a variant of alloc@zpos-4x-domino-fail, with plane ordering changed so
that one layer can be mapped to a plane.
This commit is contained in:
Simon Ser 2019-09-14 21:18:20 +03:00
parent a93ea4a300
commit 8c93a6fc88
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 42 additions and 0 deletions

View file

@ -34,6 +34,7 @@ alloc_tests = [
'zpos-4x-intersect-partial', 'zpos-4x-intersect-partial',
#'zpos-4x-disjoint', #'zpos-4x-disjoint',
'zpos-4x-domino-fail', 'zpos-4x-domino-fail',
#'zpos-4x-domino-partial',
] ]
foreach name : alloc_tests foreach name : alloc_tests

View file

@ -368,6 +368,47 @@ static struct test_case tests[] = {
}, },
}, },
}, },
{
.name = "zpos-4x-domino-partial",
/* A layer on top falls back to composition. A layer at zpos=2
* falls back to composition too because it's underneath. A
* layer at zpos=3 doesn't intersect with the one at zpos=4 and
* is over the one at zpos=2 so it can be mapped to a plane. */
.layers = {
{
.width = 1920,
.height = 1080,
.zpos = 1,
.compat = { PRIMARY_PLANE },
.result = PRIMARY_PLANE,
},
{
.width = 100,
.height = 100,
.zpos = 4,
.compat = { NULL },
.result = NULL,
},
{
.x = 100,
.y = 100,
.width = 100,
.height = 100,
.zpos = 3,
.compat = FIRST_4_PLANES,
.result = CURSOR_PLANE,
},
{
.x = 50,
.y = 50,
.width = 100,
.height = 100,
.zpos = 2,
.compat = FIRST_4_PLANES,
.result = NULL,
},
},
},
}; };
static void run_test(struct test_layer *test_layers) static void run_test(struct test_layer *test_layers)