mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-16 22:48:55 +00:00
macOS Page.captureScreenshot is flat ~24ms/frame with no dedup; static holds re-capture identical buffers for nothing. computeStaticFrameSet walks window.__timelines at init and marks frame f dedupable iff f and f-1 are both outside every GSAP tween interval (totalDuration, so repeat/yoyo counts) AND neither is a clip-cut boundary (hard scene swaps change content with no tween). captureFrameCore reuses session.lastFrameBuffer for dedupable frames, skipping the seek + capture. Whole-comp disqualified on video/canvas/webgl or init-visible non-GSAP animation (getAnimations). Opt-in HF_STATIC_DEDUP=true, default off. Validated lossless (dedup vs bit-deterministic screenshot baseline = inf/>60dB) on 5 comps reusing 44-80% of frames. Two bugs found+fixed during validation: duration vs totalDuration (repeat/yoyo froze) and clip-cut frames (scene swaps froze). Residual risk keeping it opt-in: CSS/rAF animation not running at init and not clip-driven would be invisible to the init guard. None seen in tested corpus; a generic sample-verification backstop is the follow-up to default it on. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>