compositor: stop direct accessing core struct member
Commit "weston-log: add function to avoid direct
access to compositor members in non-core code" added the
function weston_compositor_add_log_scope mainly to allow
libweston users to avoid direct accessing core structs, as
weston_compositor.
Replace weston_log_context_add_log_scope usage by
weston_compositor_add_log_scope.
Signed-off-by: Leandro Ribeiro <leandrohr@riseup.net>
diff --git a/libweston/compositor.c b/libweston/compositor.c
index 81bd23b..de6931a 100644
--- a/libweston/compositor.c
+++ b/libweston/compositor.c
@@ -7301,17 +7301,17 @@
WESTON_LAYER_POSITION_CURSOR);
ec->debug_scene =
- weston_log_ctx_add_log_scope(ec->weston_log_ctx, "scene-graph",
- "Scene graph details\n",
- debug_scene_graph_cb, NULL,
- ec);
+ weston_compositor_add_log_scope(ec, "scene-graph",
+ "Scene graph details\n",
+ debug_scene_graph_cb, NULL,
+ ec);
ec->timeline =
- weston_log_ctx_add_log_scope(ec->weston_log_ctx, "timeline",
- "Timeline event points\n",
- weston_timeline_create_subscription,
- weston_timeline_destroy_subscription,
- ec);
+ weston_compositor_add_log_scope(ec, "timeline",
+ "Timeline event points\n",
+ weston_timeline_create_subscription,
+ weston_timeline_destroy_subscription,
+ ec);
return ec;
fail: