diff options
author | Marius Vlad <marius.vlad@collabora.com> | 2023-05-04 18:01:16 +0300 |
---|---|---|
committer | Marius Vlad <marius.vlad@collabora.com> | 2023-05-04 18:01:57 +0300 |
commit | 01171e9abf8a132aa872bf2880e11a464a8ce3cc (patch) | |
tree | 90d11b4b24e910e403b44b828cdbadf736a1f03e | |
parent | cea026b06a9073916b0c21d61cda0965e0bf3d82 (diff) |
compositor: Let the user know about the debug scopes available
Bug-AGL: SPEC-4593
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I79d4447b7768b72712e244504782a33ba257a33d
-rw-r--r-- | src/compositor.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/compositor.c b/src/compositor.c index 8df333d..ef06314 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -1791,6 +1791,7 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da int version = 0; int no_config = 0; int debug = 0; + bool list_debug_scopes = false; char *config_file = NULL; struct weston_log_context *log_ctx = NULL; struct weston_log_subscriber *logger; @@ -1809,6 +1810,7 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da { WESTON_OPTION_STRING, "config", 'c', &config_file }, { WESTON_OPTION_STRING, "modules", 0, &option_modules }, { WESTON_OPTION_STRING, "debug-scopes", 'l', &debug_scopes }, + { WESTON_OPTION_STRING, "list-debug-scopes", 'L', &list_debug_scopes }, }; wl_list_init(&ivi.outputs); @@ -1937,6 +1939,22 @@ int wet_main(int argc, char *argv[], const struct weston_testsuite_data *test_da if (ivi_shell_init(&ivi) < 0) goto error_compositor; + if (list_debug_scopes) { + struct weston_log_scope *nscope = NULL; + + weston_log("Printing available debug scopes:\n"); + + while ((nscope = weston_log_scopes_iterate(ivi.compositor, nscope))) { + weston_log("\tscope name: %s, desc: %s", + weston_log_scope_get_name(nscope), + weston_log_scope_get_description(nscope)); + } + + weston_log("\n"); + + goto error_compositor; + } + add_bindings(ivi.compositor); weston_compositor_flush_heads_changed(ivi.compositor); |