mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
This adds a flag, -p,--presentation-timings, that enables input lag measuring using the presentation time Wayland protocol. When enabled, we store a timestamp when we *send* a key to the slave. Then, when we commit a frame for rendering to the compositor, we request presentation feedback. We also store a timestamp for when the frame was committed. The 'presented' callback then looks at the input and commit timestamps, and compares it with the presented timestamp. The delay is logged at INFO when the delay was less than one frame interval, at WARN when it was one frame interval, and at ERR when it was two or more frame intervals. We also update statistic counters that we log when foot is shut down.
42 lines
736 B
C
42 lines
736 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
|
|
#include <tllist.h>
|
|
|
|
#include "terminal.h"
|
|
|
|
struct config {
|
|
char *term;
|
|
char *shell;
|
|
unsigned width;
|
|
unsigned height;
|
|
|
|
tll(char *) fonts;
|
|
|
|
int scrollback_lines;
|
|
|
|
struct {
|
|
uint32_t fg;
|
|
uint32_t bg;
|
|
uint32_t regular[8];
|
|
uint32_t bright[8];
|
|
uint16_t alpha;
|
|
} colors;
|
|
|
|
struct {
|
|
enum cursor_style style;
|
|
struct {
|
|
uint32_t text;
|
|
uint32_t cursor;
|
|
} color;
|
|
} cursor;
|
|
|
|
size_t render_worker_count;
|
|
char *server_socket_path;
|
|
bool presentation_timings;
|
|
};
|
|
|
|
bool config_load(struct config *conf, const char *path);
|
|
void config_free(struct config conf);
|