Merge branch 'tweak-damage-everything' into master

This commit is contained in:
Daniel Eklöf 2020-09-07 19:44:54 +02:00
commit e81d23befc
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 27 additions and 2 deletions

View file

@ -1361,6 +1361,9 @@ parse_section_tweak(
if (strcmp(key, "allow-overflowing-double-width-glyphs") == 0) if (strcmp(key, "allow-overflowing-double-width-glyphs") == 0)
conf->tweak.allow_overflowing_double_width_glyphs = str_to_bool(value); conf->tweak.allow_overflowing_double_width_glyphs = str_to_bool(value);
else if (strcmp(key, "damage-whole-window") == 0)
conf->tweak.damage_whole_window = str_to_bool(value);
else if (strcmp(key, "render-timer") == 0) { else if (strcmp(key, "render-timer") == 0) {
if (strcmp(value, "none") == 0) { if (strcmp(value, "none") == 0) {
conf->tweak.render_timer_osd = false; conf->tweak.render_timer_osd = false;
@ -1801,6 +1804,7 @@ config_load(struct config *conf, const char *conf_path, bool errors_are_fatal)
.max_shm_pool_size = 512 * 1024 * 1024, .max_shm_pool_size = 512 * 1024 * 1024,
.render_timer_osd = false, .render_timer_osd = false,
.render_timer_log = false, .render_timer_log = false,
.damage_whole_window = false,
}, },
.notifications = tll_init(), .notifications = tll_init(),

View file

@ -147,6 +147,7 @@ struct config {
bool allow_overflowing_double_width_glyphs; bool allow_overflowing_double_width_glyphs;
bool render_timer_osd; bool render_timer_osd;
bool render_timer_log; bool render_timer_log;
bool damage_whole_window;
uint64_t delayed_render_lower_ns; uint64_t delayed_render_lower_ns;
uint64_t delayed_render_upper_ns; uint64_t delayed_render_upper_ns;
off_t max_shm_pool_size; off_t max_shm_pool_size;

View file

@ -441,8 +441,8 @@ When reporting bugs, please mention if, and to what, you have changed
any of these options. any of these options.
*allow-overflowing-double-width-glyphs* *allow-overflowing-double-width-glyphs*
When enabled, double width glyphs with a character width of 1 are Boolean. when enabled, double width glyphs with a character width
allowed to overflow into the neighbouring cell. of 1 are allowed to overflow into the neighbouring cell.
One use case for this is fonts "icon" characters in the Unicode One use case for this is fonts "icon" characters in the Unicode
private usage area, e.g. Nerd Fonts, or Powerline Fonts. Without private usage area, e.g. Nerd Fonts, or Powerline Fonts. Without
@ -528,6 +528,21 @@ any of these options.
Default: lower=_500000_ (0.5ms), upper=_8333333_ (8.3ms - half a Default: lower=_500000_ (0.5ms), upper=_8333333_ (8.3ms - half a
frame interval). frame interval).
*damage-whole-window*
Boolean. When enabled, foot will 'damage' the entire window each
time a frame has been rendered. This forces the compositor to
redraw the entire window. If disabled, foot will only 'damage'
updated rows.
There is normally *no* reason to enable this. However, it has been
seen to workaround an issue with _fractional scaling_ in _Gnome_.
Note that enabling this option is likely to increase CPU and/or
GPU usage (by the compositor, not by foot), and may have a
negative impact on battery life.
Default: _false_.
*max-shm-pool-size-mb* *max-shm-pool-size-mb*
This option controls the amount of *virtual* memory used by the This option controls the amount of *virtual* memory used by the
pixmap memory to which the terminal screen content is rendered. pixmap memory to which the terminal screen content is rendered.

View file

@ -1819,6 +1819,11 @@ grid_render(struct terminal *term, bool redraw_margins)
} }
} }
if (term->conf->tweak.damage_whole_window) {
wl_surface_damage_buffer(
term->window->surface, 0, 0, INT32_MAX, INT32_MAX);
}
wl_surface_attach(term->window->surface, buf->wl_buf, 0, 0); wl_surface_attach(term->window->surface, buf->wl_buf, 0, 0);
quirk_kde_damage_before_attach(term->window->surface); quirk_kde_damage_before_attach(term->window->surface);
wl_surface_commit(term->window->surface); wl_surface_commit(term->window->surface);