diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2020-03-29 10:07:53 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2020-03-29 10:07:53 +0000 |
| commit | 2c7ee09dad6de4fe8a226eb4ec8fda26f783c240 (patch) | |
| tree | 159098e2db1a376b23a5ea729f9cf926d574714d /config.c | |
| parent | ci: initial sr.ht build manifest (diff) | |
| parent | changelog: mention renderer performance improvements with scrolling (diff) | |
Merge branch 'scroll-damage-performance'
Diffstat (limited to 'config.c')
| -rw-r--r-- | config.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -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, }, }; |
