libweston: Create the 'timeline' scope

With everything now in place, it is time to create the timeline scope.

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
This commit is contained in:
Marius Vlad 2019-09-05 14:31:01 +03:00
parent fb10ed768b
commit da104ebe5b
3 changed files with 18 additions and 0 deletions

View File

@ -1118,6 +1118,7 @@ struct weston_compositor {
struct weston_log_context *weston_log_ctx;
struct weston_log_scope *debug_scene;
struct weston_log_scope *timeline;
struct content_protection *content_protection;
};

View File

@ -7294,6 +7294,12 @@ weston_compositor_create(struct wl_display *display,
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);
return ec;
fail:
@ -7618,6 +7624,9 @@ weston_compositor_tear_down(struct weston_compositor *compositor)
weston_compositor_log_scope_destroy(compositor->debug_scene);
compositor->debug_scene = NULL;
weston_compositor_log_scope_destroy(compositor->timeline);
compositor->timeline = NULL;
}
/** Destroys the compositor.

View File

@ -108,4 +108,12 @@ weston_log_subscription_get_data(struct weston_log_subscription *sub);
void
weston_log_subscription_set_data(struct weston_log_subscription *sub, void *data);
void
weston_timeline_create_subscription(struct weston_log_subscription *sub,
void *user_data);
void
weston_timeline_destroy_subscription(struct weston_log_subscription *sub,
void *user_data);
#endif /* WESTON_LOG_INTERNAL_H */