From c43c10bd783c2510fa2b17513c31420c6638017b Mon Sep 17 00:00:00 2001 From: Chuck <33324927+ChuckBuilds@users.noreply.github.com> Date: Thu, 24 Sep 2026 17:42:42 -0400 Subject: [PATCH] fix(vegas): keep the sub-pixel frame interval #637 removed as dead code On main, RenderPipeline._frame_interval was set and never read, so #637 dropped it. Here the frame_interval property reads it for the sub-pixel path (the crisp path solves its own), so the merge brings it back, with a comment saying who reads it. #637's new coordinator test drives a MagicMock pipeline, which this branch's pacing reads frame_interval and target_fps from; give the mock real ones. Co-Authored-By: Claude Opus 5.5 --- src/vegas_mode/render_pipeline.py | 3 +++ test/test_vegas_coordinator_iteration.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/vegas_mode/render_pipeline.py b/src/vegas_mode/render_pipeline.py index a2fddcc8..d1af0c79 100644 --- a/src/vegas_mode/render_pipeline.py +++ b/src/vegas_mode/render_pipeline.py @@ -102,6 +102,8 @@ class RenderPipeline: self._cycle_complete = False self._segments_in_scroll: List[str] = [] # Plugin IDs in current scroll + # The sub-pixel path's pacing; the crisp path solves its own (frame_interval). + self._frame_interval = config.get_frame_interval() self._cycle_start_time = 0.0 # Statistics @@ -883,6 +885,7 @@ class RenderPipeline: """ old_fps = self.config.target_fps self.config = new_config + self._frame_interval = new_config.get_frame_interval() # Reconfigure scroll helper self._configure_scroll_helper() diff --git a/test/test_vegas_coordinator_iteration.py b/test/test_vegas_coordinator_iteration.py index 329b36fa..954c33b7 100644 --- a/test/test_vegas_coordinator_iteration.py +++ b/test/test_vegas_coordinator_iteration.py @@ -21,6 +21,9 @@ def _coordinator(plugins): coord.vegas_config = VegasModeConfig.from_config({'display': {'vegas_scroll': { 'enabled': True, 'max_cycle_duration': 0}}}) coord.render_pipeline = MagicMock() + # The loop paces itself from these (#628); a MagicMock can't be compared. + coord.render_pipeline.frame_interval = 0.0 + coord.render_pipeline.target_fps = 90 coord.stream_manager = MagicMock() coord.display_manager = MagicMock() coord.plugin_manager = SimpleNamespace(plugins=plugins, get_plugin=plugins.get)