From 7575f851fe83745c23304eeb49d869362a10520c Mon Sep 17 00:00:00 2001 From: atagen Date: Thu, 21 May 2026 15:53:19 +1000 Subject: [PATCH] Document deferred retained scaling polish --- docs/window-animations-plan.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/window-animations-plan.md b/docs/window-animations-plan.md index ffbfe19c..aea6ab98 100644 --- a/docs/window-animations-plan.md +++ b/docs/window-animations-plan.md @@ -20,6 +20,9 @@ be handled deliberately. working and testable. - Content freezing will use retained per-surface texture references, not a full offscreen snapshot as the default design. +- Retained records should keep using the existing renderer behavior for now, + including clipping and edge stretch/clamp behavior for undersized contents. A + dedicated retained-tree scaling path is deferred to a later polish phase. - The multiphase animation concept is original to Wry. Hy3 is relevant only as partial inspiration for tiling style and titlebar/grouping behavior. - Mono mode should mostly avoid animations. Exceptions are windows entering or @@ -107,6 +110,8 @@ Initial retained-record implementation status: - Retained records hold both `GfxTexture` and `SurfaceBuffer` references so the existing buffer release/sync path remains authoritative. - Single-pixel buffers can be retained as color records. +- Retained records render through the same texture and stretch/clamp paths used + by live surfaces. This is the expected Phase 2 behavior. - Async SHM textures are not retained yet because Wry's per-surface SHM front/back textures can be reused by later commits while an animation is still running. Those surfaces fall back to live rendering until an explicit offscreen @@ -121,13 +126,16 @@ Implementation shape: - Extend event/sync handling so retained buffers remain valid until the animation is complete. -Open design work: +Deferred/future polish: -- Exact lifetime model for retained `SurfaceBuffer` / `GfxTexture` references. - Whether retained records participate in frame callbacks or presentation feedback. Default assumption: no, because they are compositor animation frames, not client commits. - How to fall back when a buffer cannot be safely retained. +- A distinct retained-tree scaling render path for true spawn-in/spawn-out + content scaling. If added, start with retained GPU-backed records only, keep + the animated frame as the clip boundary, and avoid live SHM scaling until there + is an explicit snapshot/copy fallback. ## Phase 3: Multiphase No-Overlap Animations