test/alloc: add zpos-3x-zero-alpha

References: https://gitlab.freedesktop.org/emersion/libliftoff/-/issues/59
This commit is contained in:
Simon Ser 2022-01-31 14:29:16 +01:00
parent 223e288ae6
commit 378ccb4f84
2 changed files with 29 additions and 0 deletions

View file

@ -47,6 +47,7 @@ tests = {
'composition-3x-force',
'zpos-2x-reverse',
'zpos-3x-zero-fb-id',
'zpos-3x-zero-alpha',
],
'dynamic': [
'same',

View file

@ -568,6 +568,34 @@ static const struct test_case tests[] = {
},
},
},
{
.name = "zpos-3x-zero-alpha",
.needs_composition = false,
/* Same as zpos-3x-zero-fb-id but with a zero alpha. */
.layers = {
{
.width = 1920,
.height = 1080,
.props = {{ "zpos", 1 }},
.compat = { PRIMARY_PLANE },
.result = PRIMARY_PLANE,
},
{
.width = 200,
.height = 200,
.props = {{ "zpos", 2 }},
.compat = { OVERLAY_PLANE },
.result = OVERLAY_PLANE,
},
{
.width = 100,
.height = 100,
.props = {{ "zpos", 3 }, { "alpha", 0 }},
.compat = { 0 },
.result = NULL,
},
},
},
{
.name = "composition-3x",
.needs_composition = true,