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