tests/buffer-transforms: reduce split cases

The point of buffer_transform_split is to ensure that committing only
transform and scale changes gets reflected on screen, without explicit
damage. There is no need to go through the big set of parameter
combinations, it only needs to test that changing each triggers the
damage.

Test setting only scale and only transform separately, so that one
cannot mask bugs with the other.

This brings the screenshot count for buffer_transform_split from 12 down
to 2, which is good for CI running time.

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
This commit is contained in:
Pekka Paalanen 2026-04-10 11:58:20 +03:00
parent 3ce5a2e774
commit 2a7288e70e

View file

@ -161,7 +161,12 @@ TEST_P(buffer_transform, my_buffer_args)
return RESULT_OK;
}
TEST_P(buffer_transform_split, my_buffer_args)
static const struct buffer_args my_split_args[] = {
{ 1, TRANSFORM(90) },
{ 2, TRANSFORM(NORMAL) },
};
TEST_P(buffer_transform_split, my_split_args)
{
const struct buffer_args *bargs = data;
const struct setup_args *oargs;
@ -197,9 +202,14 @@ TEST_P(buffer_transform_split, my_buffer_args)
* Commit scale and transform separately. Otherwise identical to the
* 'buffer_transform' test so the same validation images can be used.
*/
wl_surface_set_buffer_scale(client->surface->wl_surface, bargs->scale);
wl_surface_set_buffer_transform(client->surface->wl_surface,
bargs->transform);
if (bargs->scale != 1)
wl_surface_set_buffer_scale(client->surface->wl_surface, bargs->scale);
if (bargs->transform != WL_OUTPUT_TRANSFORM_NORMAL) {
wl_surface_set_buffer_transform(client->surface->wl_surface,
bargs->transform);
}
wl_surface_commit(client->surface->wl_surface);
match = verify_screen_content(client, refname, 0, NULL, 0, NULL,