From d8521ffc56b019a404d796741f828cc302819de9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Tue, 7 Sep 2021 10:31:26 +0200 Subject: [PATCH] tests/wayland-test-driver: Add surface argument to sync_point request Will allow more "specific" sync points; will be used in the future by new tests. Part-of: --- src/tests/meta-wayland-test-driver.c | 7 +++++-- src/tests/wayland-test-clients/test-driver.xml | 1 + src/tests/wayland-test-clients/xdg-apply-limits.c | 4 ++-- src/tests/wayland-unit-tests.c | 1 + 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/src/tests/meta-wayland-test-driver.c b/src/tests/meta-wayland-test-driver.c index 0eecf8d45..24ce06030 100644 --- a/src/tests/meta-wayland-test-driver.c +++ b/src/tests/meta-wayland-test-driver.c @@ -81,12 +81,14 @@ sync_actor_destroy (struct wl_client *client, static void sync_point (struct wl_client *client, struct wl_resource *resource, - uint32_t sequence) + uint32_t sequence, + struct wl_resource *surface_resource) { MetaWaylandTestDriver *test_driver = wl_resource_get_user_data (resource); g_signal_emit (test_driver, signals[SYNC_POINT], 0, sequence, + surface_resource, client); } @@ -133,8 +135,9 @@ meta_wayland_test_driver_class_init (MetaWaylandTestDriverClass *klass) G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL, - G_TYPE_NONE, 2, + G_TYPE_NONE, 3, G_TYPE_UINT, + G_TYPE_POINTER, G_TYPE_POINTER); } diff --git a/src/tests/wayland-test-clients/test-driver.xml b/src/tests/wayland-test-clients/test-driver.xml index 2433cf111..27574b101 100644 --- a/src/tests/wayland-test-clients/test-driver.xml +++ b/src/tests/wayland-test-clients/test-driver.xml @@ -8,6 +8,7 @@ + diff --git a/src/tests/wayland-test-clients/xdg-apply-limits.c b/src/tests/wayland-test-clients/xdg-apply-limits.c index aa5ab6e70..47153cc4f 100644 --- a/src/tests/wayland-test-clients/xdg-apply-limits.c +++ b/src/tests/wayland-test-clients/xdg-apply-limits.c @@ -236,7 +236,7 @@ handle_frame_callback (void *data, { case STATE_WAIT_FOR_FRAME_1: reset_surface (); - test_driver_sync_point (test_driver, 1); + test_driver_sync_point (test_driver, 1, NULL); break; case STATE_WAIT_FOR_FRAME_2: exit (EXIT_SUCCESS); @@ -395,7 +395,7 @@ main (int argc, xdg_toplevel_set_max_size(xdg_toplevel, 700, 500); wl_surface_commit (surface); - test_driver_sync_point (test_driver, 0); + test_driver_sync_point (test_driver, 0, NULL); running = TRUE; while (running) diff --git a/src/tests/wayland-unit-tests.c b/src/tests/wayland-unit-tests.c index 3f8c62c0c..03bab12a1 100644 --- a/src/tests/wayland-unit-tests.c +++ b/src/tests/wayland-unit-tests.c @@ -202,6 +202,7 @@ typedef struct _ApplyLimitData static void on_sync_point (MetaWaylandTestDriver *test_driver, unsigned int sequence, + struct wl_resource *surface_resource, struct wl_client *wl_client, ApplyLimitData *data) {