mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
backend: add get_present_clock
This commit is contained in:
parent
9203bfdd4f
commit
54e1287f30
7 changed files with 33 additions and 6 deletions
|
|
@ -6,6 +6,7 @@
|
|||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <wayland-server.h>
|
||||
#include <wayland-util.h>
|
||||
#include <wlr/backend/drm.h>
|
||||
|
|
@ -67,6 +68,7 @@ struct wlr_drm_backend {
|
|||
|
||||
struct wlr_drm_backend *parent;
|
||||
const struct wlr_drm_interface *iface;
|
||||
clockid_t clock;
|
||||
|
||||
int fd;
|
||||
|
||||
|
|
|
|||
|
|
@ -62,5 +62,9 @@ struct wlr_renderer *wlr_backend_get_renderer(struct wlr_backend *backend);
|
|||
* Might return NULL for backends that don't use a session.
|
||||
*/
|
||||
struct wlr_session *wlr_backend_get_session(struct wlr_backend *backend);
|
||||
/**
|
||||
* Returns the clock used by the backend for presentation feedback.
|
||||
*/
|
||||
clockid_t wlr_backend_get_present_clock(struct wlr_backend *backend);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#define WLR_BACKEND_INTERFACE_H
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <time.h>
|
||||
#include <wlr/backend.h>
|
||||
#include <wlr/render/egl.h>
|
||||
|
||||
|
|
@ -18,6 +19,7 @@ struct wlr_backend_impl {
|
|||
void (*destroy)(struct wlr_backend *backend);
|
||||
struct wlr_renderer *(*get_renderer)(struct wlr_backend *backend);
|
||||
struct wlr_session *(*get_session)(struct wlr_backend *backend);
|
||||
clockid_t (*get_present_clock)(struct wlr_backend *backend);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue