weston-log: rename the confusing function name weston_compositor_add_log_scope()
There's a function named weston_compositor_add_log_scope() but it doesn't take a struct weston_compositor argument. Rename it to weston_log_ctx_add_log_scope(), as the log_scope is being added to a log_context. Also, bump libweston_major to 9. Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
This commit is contained in:
@@ -2825,10 +2825,10 @@ drm_backend_create(struct weston_compositor *compositor,
|
||||
b->pageflip_timeout = config->pageflip_timeout;
|
||||
b->use_pixman_shadow = config->use_pixman_shadow;
|
||||
|
||||
b->debug = weston_compositor_add_log_scope(compositor->weston_log_ctx,
|
||||
"drm-backend",
|
||||
"Debug messages from DRM/KMS backend\n",
|
||||
NULL, NULL, NULL);
|
||||
b->debug = weston_log_ctx_add_log_scope(compositor->weston_log_ctx,
|
||||
"drm-backend",
|
||||
"Debug messages from DRM/KMS backend\n",
|
||||
NULL, NULL, NULL);
|
||||
|
||||
compositor->backend = &b->base;
|
||||
|
||||
|
||||
@@ -7321,17 +7321,17 @@ weston_compositor_create(struct wl_display *display,
|
||||
WESTON_LAYER_POSITION_CURSOR);
|
||||
|
||||
ec->debug_scene =
|
||||
weston_compositor_add_log_scope(ec->weston_log_ctx, "scene-graph",
|
||||
"Scene graph details\n",
|
||||
debug_scene_graph_cb, NULL,
|
||||
ec);
|
||||
weston_log_ctx_add_log_scope(ec->weston_log_ctx, "scene-graph",
|
||||
"Scene graph details\n",
|
||||
debug_scene_graph_cb, NULL,
|
||||
ec);
|
||||
|
||||
ec->timeline =
|
||||
weston_compositor_add_log_scope(ec->weston_log_ctx, "timeline",
|
||||
"Timeline event points\n",
|
||||
weston_timeline_create_subscription,
|
||||
weston_timeline_destroy_subscription,
|
||||
ec);
|
||||
weston_log_ctx_add_log_scope(ec->weston_log_ctx, "timeline",
|
||||
"Timeline event points\n",
|
||||
weston_timeline_create_subscription,
|
||||
weston_timeline_destroy_subscription,
|
||||
ec);
|
||||
return ec;
|
||||
|
||||
fail:
|
||||
|
||||
@@ -339,9 +339,9 @@ weston_compositor_enable_content_protection(struct weston_compositor *compositor
|
||||
|
||||
cp->destroy_listener.notify = cp_destroy_listener;
|
||||
wl_signal_add(&compositor->destroy_signal, &cp->destroy_listener);
|
||||
cp->debug = weston_compositor_add_log_scope(compositor->weston_log_ctx,
|
||||
"content-protection-debug",
|
||||
"debug-logs for content-protection",
|
||||
NULL, NULL, NULL);
|
||||
cp->debug = weston_log_ctx_add_log_scope(compositor->weston_log_ctx,
|
||||
"content-protection-debug",
|
||||
"debug-logs for content-protection",
|
||||
NULL, NULL, NULL);
|
||||
return 0;
|
||||
}
|
||||
|
||||
+10
-10
@@ -355,7 +355,7 @@ weston_log_subscription_remove(struct weston_log_subscription *sub)
|
||||
* matching against the \c name.
|
||||
*
|
||||
* @param log_ctx
|
||||
* @param name the scope name, see weston_compositor_add_log_scope()
|
||||
* @param name the scope name, see weston_log_ctx_add_log_scope()
|
||||
* @returns NULL if none found, or a pointer to a weston_log_scope
|
||||
*
|
||||
* @ingroup internal-log
|
||||
@@ -580,12 +580,12 @@ weston_compositor_is_debug_protocol_enabled(struct weston_compositor *wc)
|
||||
* @sa weston_log_scope_cb, weston_log_subscribe
|
||||
*/
|
||||
WL_EXPORT struct weston_log_scope *
|
||||
weston_compositor_add_log_scope(struct weston_log_context *log_ctx,
|
||||
const char *name,
|
||||
const char *description,
|
||||
weston_log_scope_cb new_subscription,
|
||||
weston_log_scope_cb destroy_subscription,
|
||||
void *user_data)
|
||||
weston_log_ctx_add_log_scope(struct weston_log_context *log_ctx,
|
||||
const char *name,
|
||||
const char *description,
|
||||
weston_log_scope_cb new_subscription,
|
||||
weston_log_scope_cb destroy_subscription,
|
||||
void *user_data)
|
||||
{
|
||||
struct weston_log_scope *scope;
|
||||
struct weston_log_subscription *pending_sub = NULL;
|
||||
@@ -726,7 +726,7 @@ weston_log_subscription_complete(struct weston_log_subscription *sub)
|
||||
* stream. Particularly useful for the weston-debug protocol.
|
||||
*
|
||||
* @memberof weston_log_scope
|
||||
* @sa weston_compositor_add_log_scope, weston_compositor_log_scope_destroy
|
||||
* @sa weston_log_ctx_add_log_scope, weston_compositor_log_scope_destroy
|
||||
*/
|
||||
WL_EXPORT void
|
||||
weston_log_scope_complete(struct weston_log_scope *scope)
|
||||
@@ -895,9 +895,9 @@ weston_log_scope_timestamp(struct weston_log_scope *scope,
|
||||
* to the scope \c scope_name.
|
||||
*
|
||||
* If \c scope_name has already been created (using
|
||||
* weston_compositor_add_log_scope) the subscription will take place
|
||||
* weston_log_ctx_add_log_scope) the subscription will take place
|
||||
* immediately, otherwise we store the subscription into a pending list. See
|
||||
* also weston_compositor_add_log_scope().
|
||||
* also weston_log_ctx_add_log_scope().
|
||||
*
|
||||
* @param log_ctx the log context, used for accessing pending list
|
||||
* @param subscriber the subscriber, which has to be created before
|
||||
|
||||
Reference in New Issue
Block a user