mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-22 01:40:17 -05:00
Merge branch 'scroll-damage-performance'
This commit is contained in:
commit
2c7ee09dad
12 changed files with 801 additions and 167 deletions
14
config.c
14
config.c
|
|
@ -22,6 +22,7 @@
|
|||
#include "wayland.h"
|
||||
|
||||
#define ALEN(v) (sizeof(v) / sizeof(v[0]))
|
||||
#define min(x, y) ((x) < (y) ? (x) : (y))
|
||||
|
||||
static const uint32_t default_foreground = 0xdcdccc;
|
||||
static const uint32_t default_background = 0x111111;
|
||||
|
|
@ -636,6 +637,18 @@ parse_section_tweak(
|
|||
LOG_WARN("tweak: delayed-render-upper=%lu", ns);
|
||||
}
|
||||
|
||||
else if (strcmp(key, "max-shm-pool-size-mb") == 0) {
|
||||
unsigned long mb;
|
||||
if (!str_to_ulong(value, 10, &mb)) {
|
||||
LOG_ERR("%s:%d: expected an integer: %s", path, lineno, value);
|
||||
return false;
|
||||
}
|
||||
|
||||
conf->tweak.max_shm_pool_size = min(mb * 1024 * 1024, INT32_MAX);
|
||||
LOG_WARN("tweak: max-shm-pool-size=%lu bytes",
|
||||
conf->tweak.max_shm_pool_size);
|
||||
}
|
||||
|
||||
else {
|
||||
LOG_ERR("%s:%u: invalid key: %s", path, lineno, key);
|
||||
return false;
|
||||
|
|
@ -906,6 +919,7 @@ config_load(struct config *conf, const char *conf_path)
|
|||
.tweak = {
|
||||
.delayed_render_lower_ns = 500000, /* 0.5ms */
|
||||
.delayed_render_upper_ns = 16666666 / 2, /* half a frame period (60Hz) */
|
||||
.max_shm_pool_size = 512 * 1024 * 1024,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue