mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
abbac9750b
Restoring per-PR-787 behavior for HDR specifically. The agent that built PR #787 removed cfg.forceScreenshot = true unconditionally, but HDR sessions need it because: 1. With --enable-begin-frame-control on, Page.captureScreenshot hangs indefinitely (the compositor is paused; only beginFrame advances it). 2. With beginFrame as the alpha capture method, HDR per-frame readback exceeds CDP protocolTimeout (regression-shards (hdr) on c12bdce9 confirmed Page.captureScreenshot timed out — which only happens when the session is in beginframe mode but the call routes to Page.captureScreenshot). Fix: gate forceScreenshot on hasHdrContent. HDR sessions go into screenshot mode (no --enable-begin-frame-control, Page.captureScreenshot works normally). SDR shader-transition sessions stay in beginframe mode and use the fast captureAlphaPngBeginFrame path for the 5x win. The compositeTransfer === "srgb" check at the per-frame call sites (c12bdce9) is now redundant (HDR session is in screenshot mode → session.captureMode === "screenshot" → takes the screenshot branch regardless of transfer) but kept as belt-and-suspenders.