diff options
| author | Can Celik <ogulcancelik@gmail.com> | 2026-09-28 16:19:42 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-28 16:19:42 +0300 |
| commit | 80c0c07250d22f69d3fa05cb1700302d66180eb8 (patch) | |
| tree | 9e1903d65c83263354be4b2166f3a7c92dc2a8e2 /src/protocol/endpoint.rs | |
| parent | 8c8cb49c237eec2f82192dd831ec7308905f2c0a (diff) | |
perf: send scrolling pane output as row shifts and skip blank cells (#4711)
* perf: send scrolling pane output as row shifts and skip blank cells
* fix: keep expanded scroll patches disjoint for the fast presentation path
Diffstat (limited to 'src/protocol/endpoint.rs')
| -rw-r--r-- | src/protocol/endpoint.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/protocol/endpoint.rs b/src/protocol/endpoint.rs index 2704bf65..d1e577c4 100644 --- a/src/protocol/endpoint.rs +++ b/src/protocol/endpoint.rs @@ -61,6 +61,9 @@ pub struct EndpointClientHello { /// Accept the optional surface-delta encoding on this connection. #[serde(default)] pub surface_delta: bool, + /// Accept the optional scroll-aware patch encoding on this connection. + #[serde(default)] + pub surface_scroll: bool, #[serde(default)] pub snapshot_codecs: Vec<String>, #[serde(default)] @@ -165,6 +168,7 @@ impl EndpointServerWelcome { capabilities: vec![ super::surface_reuse::CAPABILITY.into(), super::surface_delta::CAPABILITY.into(), + super::surface_scroll::CAPABILITY.into(), SURFACE_INTEREST_CAPABILITY.into(), PRESENTATION_EFFECTS_FENCE_CAPABILITY.into(), HEALTH_CHECK_CAPABILITY.into(), @@ -210,6 +214,7 @@ mod tests { surface_active: true, surface_reuse: false, surface_delta: false, + surface_scroll: false, snapshot_codecs: vec![SNAPSHOT_CODEC_V1.into()], surface_codecs: vec![SURFACE_CODEC_V1.into()], input_codecs: vec![INPUT_CODEC_V1.into()], @@ -358,10 +363,12 @@ mod tests { value.as_object_mut().unwrap().remove("surface_active"); value.as_object_mut().unwrap().remove("surface_reuse"); value.as_object_mut().unwrap().remove("surface_delta"); + value.as_object_mut().unwrap().remove("surface_scroll"); let decoded: EndpointClientHello = serde_json::from_value(value).unwrap(); assert!(decoded.surface_active); assert!(!decoded.surface_reuse); assert!(!decoded.surface_delta); + assert!(!decoded.surface_scroll); } #[test] @@ -372,6 +379,7 @@ mod tests { vec