Commit 442ffcb7 authored by Leandro Ribeiro's avatar Leandro Ribeiro

tests: stop using frame_signal 'void *data' argument to get weston_output

Instead of getting weston_output from the frame_signal argument 'void *data',
add weston_output in the private data struct of the users that are listening
to frame_signal. With this change we are able to pass previous_damage as the
data argument.
Signed-off-by: Leandro Ribeiro's avatarLeandro Ribeiro <>
parent dd0d0b0d
......@@ -367,6 +367,7 @@ struct test_screenshot {
struct test_screenshot_frame_listener {
struct wl_listener listener;
struct weston_buffer *buffer;
struct weston_output *output;
weston_test_screenshot_done_func_t done;
void *data;
......@@ -441,7 +442,7 @@ test_screenshot_frame_notify(struct wl_listener *listener, void *data)
struct test_screenshot_frame_listener *l =
struct test_screenshot_frame_listener, listener);
struct weston_output *output = data;
struct weston_output *output = l->output;
struct weston_compositor *compositor = output->compositor;
int32_t stride;
uint8_t *pixels, *d, *s;
......@@ -536,6 +537,7 @@ weston_test_screenshot_shoot(struct weston_output *output,
/* Set up the listener */
l->buffer = buffer;
l->output = output;
l->done = done;
l->data = data;
l->listener.notify = test_screenshot_frame_notify;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment