mirror of
https://gitlab.freedesktop.org/emersion/libliftoff.git
synced 2025-01-18 10:27:00 +01:00
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:
parent
07e04a50b6
commit
a93ea4a300
2 changed files with 42 additions and 0 deletions
|
@ -33,6 +33,7 @@ alloc_tests = [
|
|||
#'zpos-3x-disjoint',
|
||||
'zpos-4x-intersect-partial',
|
||||
#'zpos-4x-disjoint',
|
||||
'zpos-4x-domino-fail',
|
||||
]
|
||||
|
||||
foreach name : alloc_tests
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue