From 5364c8ac9bc4377d87e0ad505c6b6928a1866d5d Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sun, 27 Jan 2019 19:45:40 +0000 Subject: [PATCH] Add backend_info_t::max_buffer_age Signed-off-by: Yuxuan Shui --- src/backend/backend.h | 3 +++ src/backend/gl/glx.c | 1 + src/backend/xrender.c | 1 + 3 files changed, 5 insertions(+) diff --git a/src/backend/backend.h b/src/backend/backend.h index 3383be5..362af8a 100644 --- a/src/backend/backend.h +++ b/src/backend/backend.h @@ -143,6 +143,9 @@ typedef struct backend_info { /// buffer is empty. int (*buffer_age)(void *backend_data, session_t *); + /// The maximum number buffer_age might return. + int max_buffer_age; + // =========== Hooks ============ /// Let the backend hook into the event handling queue } backend_info_t; diff --git a/src/backend/gl/glx.c b/src/backend/gl/glx.c index a298f52..11a7571 100644 --- a/src/backend/gl/glx.c +++ b/src/backend/gl/glx.c @@ -604,4 +604,5 @@ backend_info_t glx_backend = { .present = glx_present, .is_win_transparent = default_is_win_transparent, .is_frame_transparent = default_is_frame_transparent, + .max_buffer_age = 5, // XXX why? }; diff --git a/src/backend/xrender.c b/src/backend/xrender.c index 2b07aab..34db122 100644 --- a/src/backend/xrender.c +++ b/src/backend/xrender.c @@ -503,6 +503,7 @@ struct backend_info xrender_backend = { .release_win = release_win, .is_win_transparent = default_is_win_transparent, .is_frame_transparent = default_is_frame_transparent, + .max_buffer_age = 2, }; // vim: set noet sw=8 ts=8: