Skip to content

fix: preserve moving-surface image handoffs through native return - #44

Merged
rdlabo merged 3 commits into
mainfrom
fix/modal-transparent-capture
Nov 8, 2026
Merged

rdlabo merged 3 commits into
mainfrom
fix/modal-transparent-capture

Conversation

@rdlabo

@rdlabo rdlabo commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Images carried by a moving DOM surface can diverge from fixed Native snapshot copies, or disappear before the returning renderer is ready.

Add an opt-in DOM-surface handoff. The same decoded image follows its source and moves to a viewport transfer layer during entry and return. Return stages concealed Native layout, optionally aligns to measured frames, and waits for an accepted reveal revision newer than the layout revision before retiring the image. Unavailable alignment is not renderer failure. Active image ownership is independent of reusable capture-cache validity, so resizing and immediate reversal cannot leave orphaned pixels.

On iOS, renderer-view capture preserves exterior transparency. Reference-counted pixel concealment keeps layout measurable and restores interaction/accessibility after the last lease ends. Android accepts DOM-surface tokens without installing fixed Native copies. Default composited capture retains its existing route.

Tests cover immediate reversal after resize, invalid-source cleanup, optional geometry, stale acknowledgements, transparent capture and overlapping concealment leases. Captured glass interiors can retain backdrop information; this does not reproduce live refraction.

@rdlabo
rdlabo merged commit da2eab9 into main Nov 8, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant