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 <marius.vlad0@gmail.com>
This commit is contained in:
@@ -350,6 +350,16 @@ weston_compositor_enable_debug_protocol(struct weston_compositor *compositor)
|
|||||||
"information leak.\n");
|
"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
|
/** Register a new debug stream name, creating a debug scope
|
||||||
*
|
*
|
||||||
* \param compositor The libweston compositor where to add.
|
* \param compositor The libweston compositor where to add.
|
||||||
|
|||||||
@@ -39,6 +39,9 @@ struct weston_compositor;
|
|||||||
void
|
void
|
||||||
weston_compositor_enable_debug_protocol(struct weston_compositor *);
|
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_scope;
|
||||||
struct weston_debug_stream;
|
struct weston_debug_stream;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user