diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2024-05-21 14:09:34 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-05-22 11:48:46 +0000 |
| commit | 3c96d0b68e3f3d270e885c4d7bb82ae8667ba385 (patch) | |
| tree | 4d770302510598a47822e773b100c3ee44223424 /terminal.c | |
| parent | issue-template: fix typo (diff) | |
render: use single-pixel buffers for overlays, when possible
The unicode-mode, and flash overlays are single color buffers. This
means we can use the single-pixel buffer protocol.
It's undefined whether the compositor will release the buffer or not;
to make things easier, simply destroy the buffer as soon as we've
committed it.
Note that since compositors don't necessarily release single-pixel
buffers, we can't plug them into our own buffer interface. This means
we can't use buffer pointers to check if we can re-use the previous
buffer (i.e. we can skip comitting a new buffer), or if we have to
create a new one.
It's _almost_ enough to just check if the last overlay style is the
same as the current one. Except that that doesn't take window resizes
into account...
Diffstat (limited to 'terminal.c')
| -rw-r--r-- | terminal.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -2195,7 +2195,9 @@ term_font_size_reset(struct terminal *term) bool term_fractional_scaling(const struct terminal *term) { - return term->wl->fractional_scale_manager != NULL && term->window->scale > 0.; + return term->wl->fractional_scale_manager != NULL && + term->wl->viewporter != NULL && + term->window->scale > 0.; } bool |
