mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-14 18:01:20 +08:00
8ac7ae9088
Chrome's compositor determinism flags (--run-all-compositor-stages-before-draw, --disable-threaded-animation, --enable-surface-synchronization, etc.) were previously only applied for BeginFrame mode on Linux. In screenshot mode — used on macOS/Windows — the compositor ran without these constraints, allowing Metal on Apple Silicon to accumulate state drift over sustained frame captures. This produced vertical layout shifts after ~12 seconds of rendering, reported on M1 machines. The shifts occurred because the compositor's threaded animation and surface synchronization pipelines could race with Page.captureScreenshot, and without --run-all-compositor-stages-before-draw, pending compositor stages weren't flushed before each screenshot. Split the flags into two groups: - BEGINFRAME_EXCLUSIVE_FLAGS: --enable-begin-frame-control and --deterministic-mode, which pause the compositor or freeze the clock and must NOT be used in screenshot mode - COMPOSITOR_DETERMINISM_FLAGS: the remaining 7 flags that enforce deterministic compositor behavior and are safe for all capture modes The compositor flags are now applied unconditionally in buildChromeArgs. Closes #828