mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
linux-drm-syncobj-v1: new protocol implementation
References: https://gitlab.freedesktop.org/wayland/wayland-protocols/-/merge_requests/90
This commit is contained in:
parent
d9bfb47648
commit
213bd88b4c
4 changed files with 517 additions and 0 deletions
46
include/wlr/types/wlr_linux_drm_syncobj_v1.h
Normal file
46
include/wlr/types/wlr_linux_drm_syncobj_v1.h
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* This an unstable interface of wlroots. No guarantees are made regarding the
|
||||
* future consistency of this API.
|
||||
*/
|
||||
#ifndef WLR_USE_UNSTABLE
|
||||
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
||||
#endif
|
||||
|
||||
#ifndef WLR_TYPES_WLR_LINUX_DRM_SYNCOBJ_V1_H
|
||||
#define WLR_TYPES_WLR_LINUX_DRM_SYNCOBJ_V1_H
|
||||
|
||||
#include <wayland-server-core.h>
|
||||
#include <wlr/util/addon.h>
|
||||
|
||||
struct wlr_linux_drm_syncobj_surface_v1_state {
|
||||
struct wlr_drm_syncobj_timeline *acquire_timeline;
|
||||
uint64_t acquire_point;
|
||||
|
||||
struct wlr_drm_syncobj_timeline *release_timeline;
|
||||
uint64_t release_point;
|
||||
};
|
||||
|
||||
struct wlr_linux_drm_syncobj_manager_v1 {
|
||||
struct wl_global *global;
|
||||
|
||||
// private state
|
||||
|
||||
int drm_fd;
|
||||
|
||||
struct wl_listener display_destroy;
|
||||
};
|
||||
|
||||
/**
|
||||
* Advertise explicit synchronization support to clients.
|
||||
*
|
||||
* The compositor must be prepared to handle fences coming from clients and to
|
||||
* send release fences correctly. In particular, both the renderer and the
|
||||
* backend need to support explicit synchronization.
|
||||
*/
|
||||
struct wlr_linux_drm_syncobj_manager_v1 *wlr_linux_drm_syncobj_manager_v1_create(
|
||||
struct wl_display *display, uint32_t version, int drm_fd);
|
||||
|
||||
struct wlr_linux_drm_syncobj_surface_v1_state *wlr_linux_drm_syncobj_v1_get_surface_state(
|
||||
struct wlr_surface *surface);
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue