src/output-state.c: add a FPS debug option

Logs the FPS per output every $timeout ms via wlr_log() if enabled.

By default this patch does nothing unless the FPS_TIMEOUT define has
been set, for example via `meson configure build -DFPS_TIMEOUT=5000`.
This commit is contained in:
Consolatis 2024-07-15 04:30:05 +02:00
parent 3be8fe25f3
commit 7a35b1e67c
3 changed files with 33 additions and 0 deletions

View file

@ -371,6 +371,7 @@ struct output {
struct server *server;
struct wlr_output *wlr_output;
struct wlr_output_state pending;
struct wl_event_source *fps_timer;
struct wlr_scene_output *scene_output;
struct wlr_scene_tree *layer_tree[LAB_NR_LAYERS];
struct wlr_scene_tree *layer_popup_tree;
@ -389,6 +390,7 @@ struct output {
bool leased;
bool gamma_lut_changed;
uint32_t frames;
};
#undef LAB_NR_LAYERS