Commit 59255583 authored by Marius Vlad's avatar Marius Vlad

compositor: Add debug key-binding to display/dump flight recorder contents

Uses (debug key-binding mod+shift+space) KEY_D to display/dump
the contents of the flight recorder.
Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad@collabora.com>
parent 3ee9d8e2
......@@ -2927,6 +2927,15 @@ weston_log_setup_scopes(struct weston_log_context *log_ctx,
free(tokenize);
}
static void
flight_rec_key_binding_handler(struct weston_keyboard *keyboard,
const struct timespec *time, uint32_t key,
void *data)
{
struct weston_log_subscriber *flight_rec = data;
weston_log_subscriber_display_flight_rec(flight_rec);
}
int main(int argc, char *argv[])
{
int ret = EXIT_FAILURE;
......@@ -3118,6 +3127,10 @@ int main(int argc, char *argv[])
weston_compositor_enable_debug_protocol(wet.compositor);
}
weston_compositor_add_debug_binding(wet.compositor, KEY_D,
flight_rec_key_binding_handler,
flight_rec);
if (weston_compositor_init_config(wet.compositor, config) < 0)
goto out;
......
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