diff --git a/include/wlr/render/drm_syncobj.h b/include/wlr/render/drm_syncobj.h index b847dbd25..bea86d191 100644 --- a/include/wlr/render/drm_syncobj.h +++ b/include/wlr/render/drm_syncobj.h @@ -4,6 +4,7 @@ #include #include #include +#include /** * A synchronization timeline. @@ -29,6 +30,8 @@ struct wlr_drm_syncobj_timeline { int drm_fd; uint32_t handle; + struct wlr_addon_set addons; + struct { size_t n_refs; } WLR_PRIVATE; diff --git a/render/drm_syncobj.c b/render/drm_syncobj.c index f23fd638d..9e5569fb4 100644 --- a/render/drm_syncobj.c +++ b/render/drm_syncobj.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include "config.h" @@ -22,6 +23,8 @@ static struct wlr_drm_syncobj_timeline *timeline_create(int drm_fd, uint32_t han timeline->n_refs = 1; timeline->handle = handle; + wlr_addon_set_init(&timeline->addons); + return timeline; } @@ -72,6 +75,7 @@ void wlr_drm_syncobj_timeline_unref(struct wlr_drm_syncobj_timeline *timeline) { return; } + wlr_addon_set_finish(&timeline->addons); drmSyncobjDestroy(timeline->drm_fd, timeline->handle); free(timeline); }