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

This test makes sure composited layers make layers underneath fall back to
composition too, in a transitive manner. That is, if plane A is under plane B
which is itself under plane C, plane A falling back to composition means that
both planes B and C fall back to composition too (even if C isn't directly
underneath A).
This commit is contained in:
Simon Ser 2019-09-14 21:05:14 +03:00
parent 07e04a50b6
commit a93ea4a300
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
2 changed files with 42 additions and 0 deletions

View file

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

View file

@ -327,6 +327,47 @@ static struct test_case tests[] = {
},
},
},
{
.name = "zpos-4x-domino-fail",
/* A layer on top falls back to composition. There is a layer at
* zpos=2 which doesn't overlap and could be mapped to a plane,
* however another layer at zpos=3 overlaps both and prevents
* all layers from being 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 = 2,
.compat = FIRST_4_PLANES,
.result = NULL,
},
{
.x = 50,
.y = 50,
.width = 100,
.height = 100,
.zpos = 3,
.compat = FIRST_4_PLANES,
.result = NULL,
},
},
},
};
static void run_test(struct test_layer *test_layers)