Commit d9bcc0b1 authored by Marius Vlad's avatar Marius Vlad

libweston/weston-debug: Add a easy way to determine if the debug protocol has been enabled

This allows additional debug features to depend on the debug protocol being enabled
Signed-off-by: Marius Vlad's avatarMarius Vlad <marius.vlad0@gmail.com>
parent f7843a50
......@@ -350,6 +350,16 @@ weston_compositor_enable_debug_protocol(struct weston_compositor *compositor)
"information leak.\n");
}
/** Determine if the debug protocol has been enabled
*
* \param wc The libweston compositor to verify if debug protocol has been enabled
*/
WL_EXPORT bool
weston_compositor_is_debug_protocol_enabled(struct weston_compositor *wc)
{
return wc->weston_debug->global != NULL;
}
/** Register a new debug stream name, creating a debug scope
*
* \param compositor The libweston compositor where to add.
......
......@@ -39,6 +39,9 @@ struct weston_compositor;
void
weston_compositor_enable_debug_protocol(struct weston_compositor *);
bool
weston_compositor_is_debug_protocol_enabled(struct weston_compositor *);
struct weston_debug_scope;
struct weston_debug_stream;
......
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