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: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1993>
This commit is contained in:
parent
ed677f49ff
commit
d8521ffc56
@ -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);
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
|
||||
<request name="sync_point">
|
||||
<arg name="sequence" type="uint"/>
|
||||
<arg name="surface" type="object" interface="wl_surface" allow-null="true"/>
|
||||
</request>
|
||||
</interface>
|
||||
</protocol>
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user