Skip to content

fix(session): preserve bitmap source stride - #1486

Merged
Marc-André Moreau (mamoreau-devolutions) merged 1 commit into
masterfrom
copilot/consolidate-bitmap-stride-fixes
Jul 30, 2026
Merged

fix(session): preserve bitmap source stride#1486
Marc-André Moreau (mamoreau-devolutions) merged 1 commit into
masterfrom
copilot/consolidate-bitmap-stride-fixes

Conversation

@mamoreau-devolutions

Copy link
Copy Markdown
Contributor

Summary

  • Preserve TS_BITMAP_DATA source stride independently of destination bounds for raw, Interleaved RLE, and RDP6 bitmap updates.
  • Remove raw 4-byte scanline padding without collapsing padded source columns into following rows.
  • Crop only the source extent beyond the destination and reject empty dimensions explicitly; do not add framebuffer bounds suppression.
  • Render decoded RDP6 RGB data top-down and retain bottom-up rendering for raw and RLE data.

Why this supersedes the overlapping proposals

Specification basis

  • MS-RDPBCGR 2.2.9.1.1.3.1.2.2 (TS_BITMAP_DATA): separate destination bounds, dimensions, and bottom-up raw rows with 4-byte row padding.
  • MS-RDPBCGR 2.2.9.1.1.3.1.2.3 and 2.2.9.1.1.3.1.2.4: compressed bitmap header and Interleaved RLE stream.
  • MS-RDPEGDI 2.2.2.5.1: RDP 6.0 bitmap stream.

Validation

  • cargo test -p ironrdp-session --lib
  • cargo check -p ironrdp-session --all-features
  • cargo clippy -p ironrdp-session --all-targets -- -D warnings
  • cargo xtask check fmt -v

Keep bitmap source dimensions independent from destination bounds across raw, RLE, and RDP6 updates.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Preserves bitmap source stride and correct row orientation across raw, RLE, and RDP6 updates.

Changes:

  • Separates source stride from cropped destination dimensions.
  • Removes raw scanline padding safely.
  • Adds stride and orientation regression tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
crates/ironrdp-session/src/image.rs Applies explicit source stride and destination cropping.
crates/ironrdp-session/src/fast_path.rs Propagates bitmap dimensions and handles padding/orientation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants