Files
IronRDP/benches
Greg Lamberson bde5824213 feat(server)!: support the Large Pointer Capability Set (#1787)
## Depends on #1786

Stacked on top of #1786's branch: Both touch `client_accepted()`'s
capabilities loop
and `UpdateEncoder::new()`'s constructor signature. #1786 must land
first.

## Summary

- `ironrdp-server` never advertises or reads the Large Pointer
Capability Set
(MS-RDPBCGR 2.2.7.2.7), even though `ironrdp-pdu` already defines
everything needed
(`LargePointer`/`LargePointerSupportFlags`, `LargePointerAttribute`) and
the client
side already decodes and renders `UpdateCode::LargePointer`. The server
side was the
only gap: A pointer shape above 32x32 (or 96x96 with just the base
Pointer
  Capability Set) could never be sent.
- Advertises the capability derived from `ironrdp-server`'s own
configured
`max_request_size`, not asserted independently: MS-RDPBCGR 2.2.7.2.7
requires the
Multifragment Update Capability Set's `MaxRequestSize` to be at least
38,055 bytes
  for `LARGE_POINTER_FLAG_96x96` and at least 608,299 bytes for
`LARGE_POINTER_FLAG_384x384`. The default `max_request_size` (8 MiB)
clears both, so
  this is enabled by default unless a server has lowered it.
- Reads the client's negotiated flags back and enforces a distinction
the spec draws
explicitly: `LARGE_POINTER_FLAG_96x96` only raises the existing
Color/New Pointer
Update's size ceiling from 32x32 to 96x96 (New Pointer Update wraps the
same
`ColorPointerAttribute` as Color Pointer Update, so MS-RDPBCGR
2.2.9.1.1.4.4's
width/height field docs apply to both); it does not enable the separate
Large
  Pointer Update PDU. Only `LARGE_POINTER_FLAG_384x384` does that.
`UpdateEncoder` now enforces both halves: `RGBAPointer` is dropped
(debug log) if it
  exceeds the negotiated 32x32/96x96 ceiling, and the new
`DisplayUpdate::LargePointer` is dropped if the client never advertised
`LARGE_POINTER_FLAG_384x384`, or if the shape exceeds the protocol's
absolute
  384x384 maximum regardless of what was advertised.
- `DisplayUpdate::LargePointer` mirrors `RGBAPointer`'s shape exactly
(32bpp XOR mask
only, no AND mask) since that's the only color depth this crate's
pointer path
produces. `ColorPointer`'s own ceiling (same `LargePointerSupportFlags`)
is left
unenforced for the same reason the prior PR left its separate
availability gate
(`colorPointerCacheSize`) ungated: Nothing in this crate constructs a
`ColorPointer`
  update.

## Breaking change

`DisplayUpdate` gains a new variant (`LargePointer`), and
`UpdateEncoder`'s (crate
internal, `#[cfg(feature = "__bench")]`-exposed for benchmarks)
constructor gains a
6th parameter. No exhaustive match over `DisplayUpdate` exists elsewhere
in the
workspace today, so nothing else needed updating.

## Validation

`cargo xtask check fmt/typos/locks/lints/tests` all pass.
2026-08-28 13:30:54 -04:00
..