diff options
author | Kirill Chibisov <contact@kchibisov.com> | 2022-02-02 00:12:58 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-02 00:12:58 +0300 |
commit | 8f1abe13e6b80da181ee856e6d5a19c7731dbedc (patch) | |
tree | afab9579c3fb1019cdda9fb7d006a51ebcd929d6 /alacritty_terminal/src/selection.rs | |
parent | d58dff18effc204d7fc9f05dac9d0b25be26ee1a (diff) | |
download | alacritty-8f1abe13e6b80da181ee856e6d5a19c7731dbedc.tar.gz alacritty-8f1abe13e6b80da181ee856e6d5a19c7731dbedc.zip |
Add damage tracking and reporting to compatible compositors
This allows compositors to only process damaged (that is, updated)
regions of our window buffer, which for larger window sizes (think 4k)
should significantly reduce compositing workload under compositors that
support/honor it, which is good for performance, battery life and lower
latency over remote connections like VNC.
On Wayland, clients are expected to always report correct damage, so
this makes us a good citizen there. It can also aid remote desktop
(waypipe, rdp, vnc, ...) and other types of screencopy by having damage
bubble up correctly.
Fixes #3186.
Diffstat (limited to 'alacritty_terminal/src/selection.rs')
-rw-r--r-- | alacritty_terminal/src/selection.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/alacritty_terminal/src/selection.rs b/alacritty_terminal/src/selection.rs index f00622d1..669db6a2 100644 --- a/alacritty_terminal/src/selection.rs +++ b/alacritty_terminal/src/selection.rs @@ -41,6 +41,7 @@ pub struct SelectionRange { impl SelectionRange { pub fn new(start: Point, end: Point, is_block: bool) -> Self { + assert!(start <= end); Self { start, end, is_block } } } |