diff options
author | Rose Hudson <rose@krx.sh> | 2023-06-02 10:25:07 +0100 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-06-05 19:50:07 +0000 |
commit | 9e8947e4d51ddafb40887b8a8ebfb1873615f9b6 (patch) | |
tree | 9a5e01483d36e8f661fbfe3ad922d65206486613 /examples/fullscreen-shell.c | |
parent | bd834fe8d1b9b380391f68c89dcdf35bdcaf64c0 (diff) |
add render timer API
Based on five calls:
wlr_render_timer_create - creates a timer which can be reused across
frames on the same renderer
wlr_renderer_begin_buffer_pass - now takes a timer so that backends can
record when the rendering starts and finishes
wlr_render_timer_get_time - should be called as late as possible so that
queries can make their way back from the GPU
wlr_render_timer_destroy - self-explanatory
The timer is exposed as an opaque `struct wlr_render_timer` so that
backends can store whatever they want in there.
Diffstat (limited to 'examples/fullscreen-shell.c')
-rw-r--r-- | examples/fullscreen-shell.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/fullscreen-shell.c b/examples/fullscreen-shell.c index f75256f2..cf6023b0 100644 --- a/examples/fullscreen-shell.c +++ b/examples/fullscreen-shell.c @@ -90,7 +90,8 @@ static void output_handle_frame(struct wl_listener *listener, void *data) { wlr_output_effective_resolution(output->wlr_output, &width, &height); struct wlr_output_state state = {0}; - struct wlr_render_pass *pass = wlr_output_begin_render_pass(output->wlr_output, &state, NULL); + struct wlr_render_pass *pass = wlr_output_begin_render_pass(output->wlr_output, &state, NULL, + NULL); if (pass == NULL) { return; } |