mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-27 01:22:21 +00:00
render/drm_syncobj: add addon set
This commit is contained in:
parent
8e36040e88
commit
ca29f43a54
@ -4,6 +4,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/util/addon.h>
|
||||
|
||||
/**
|
||||
* 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;
|
||||
|
@ -4,6 +4,7 @@
|
||||
#include <unistd.h>
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/render/drm_syncobj.h>
|
||||
#include <wlr/util/addon.h>
|
||||
#include <wlr/util/log.h>
|
||||
|
||||
#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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user