mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-21 06:46:46 -04:00
render: add wlr_renderer_get_time()
This queries the current GPU time. [1]: https://registry.khronos.org/OpenGL/extensions/EXT/EXT_disjoint_timer_query.txt References: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3025
This commit is contained in:
parent
c07424411a
commit
b4765809b5
5 changed files with 45 additions and 0 deletions
|
|
@ -433,3 +433,10 @@ int wlr_renderer_get_drm_fd(struct wlr_renderer *r) {
|
|||
}
|
||||
return r->impl->get_drm_fd(r);
|
||||
}
|
||||
|
||||
bool wlr_renderer_get_time(struct wlr_renderer *r, struct timespec *t) {
|
||||
if (!r->impl->get_time) {
|
||||
return false;
|
||||
}
|
||||
return r->impl->get_time(r, t);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue