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>
dev
Marius Vlad 5 years ago
parent fb10ed768b
commit da104ebe5b
  1. 1
      include/libweston/libweston.h
  2. 9
      libweston/compositor.c
  3. 8
      libweston/weston-log-internal.h

@ -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;
};

@ -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.

@ -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 */

Loading…
Cancel
Save