Skip to content

Support Direct2D source copies into clipped compatible targets - #274

Draft
wieslawsoltes wants to merge 4 commits into
feat/direct2d-scoped-memory-copyfrom
feat/direct2d-scoped-source-copy
Draft

wieslawsoltes wants to merge 4 commits into
feat/direct2d-scoped-memory-copyfrom
feat/direct2d-scoped-source-copy

Conversation

@wieslawsoltes

Copy link
Copy Markdown
Owner

Scoped functionality

Adds CopyFromBitmap and CopyFromRenderTarget into compatible targets with active aliased axis-aligned destination clips. The shared builder suspends and restores those exact clip scopes around the existing immutable SRC copy transaction. Full replacement retains captured drawing scopes; partial writes retain history.

This draft is stacked on #273 (feat/direct2d-scoped-memory-copy), exact dependency 4d159e87b6866f510c56abb512e32760d08cfb21. That dependency is not yet qualified. No automatic issue closure or general Direct2D compatibility claim is intended.

Source active clips/layers and scoped self-copies remain rejected. Snapshot capture precedes destination locking; format, alpha, independent DPI, physical crop, original source errors and caller state remain authoritative. No source COM identity is retained, and no renderer fallback, C ABI/COM slot/wire change or default alteration is introduced.

Tests and qualification boundary

  • Eight new source-copy pixel sequences cover both methods, full/partial overwrite, 96/192 destination DPI, nonuniform source DPI, nonzero crop, transparent replacement, source mutation/disposal and following clipped draws.
  • Both providers retain exact cold/warm/independent pixels and submission counts; the original Windows Direct2D/WIC lane independently executes all eight sequences. All four existing memory-copy cases remain.
  • Twelve portable rejection cases, moved-resource byte-exact rollback controls and an additive named-module consumer are authored.
  • Post-commit strict C++20 syntax checks passed for the actual shared image builder, Direct2D target, builder tests, compatibility tests and instantiated pixel fixtures, with 45-second process bounds. Memory inventory and diff checks passed.

No local native binary was built or executed; no GPU, VM, runtime staging or Windows observation ran locally. Hosted full Build, both-provider pixels, original Windows controls and application qualification remain required. Syntax checks are not behavioral qualification.

Implementation provenance and Microsoft contract links are recorded in docs/direct2d-scoped-source-copies.md.

@wieslawsoltes
wieslawsoltes added this pull request to stack #312 October 2, 2026 21:48

This branch has not been deployed

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant