From e459155d5199cd684cd6f0c06ad938be8b7705cb Mon Sep 17 00:00:00 2001 From: Aiden <68633820+awils27@users.noreply.github.com> Date: Mon, 11 May 2026 16:52:53 +1000 Subject: [PATCH] Clean up pass --- .../control/RuntimeServiceLiveBridge.cpp | 8 ++++++-- .../control/RuntimeServiceLiveBridge.h | 7 ++----- .../gl/OpenGLComposite.cpp | 10 ---------- .../gl/RenderEngine.h | 1 - ..._3_LIVE_STATE_SERVICE_COORDINATION_DESIGN.md | 17 ++++++----------- tests/RuntimeSubsystemTests.cpp | 1 - 6 files changed, 14 insertions(+), 30 deletions(-) diff --git a/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServiceLiveBridge.cpp b/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServiceLiveBridge.cpp index 75c62bd..93ccc0e 100644 --- a/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServiceLiveBridge.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServiceLiveBridge.cpp @@ -1,10 +1,13 @@ #include "RuntimeServiceLiveBridge.h" +#include "RenderEngine.h" #include "RuntimeServices.h" #include -void RuntimeServiceLiveBridge::DrainServiceEvents(RuntimeServices& runtimeServices, RenderEngine& renderEngine) +namespace +{ +void DrainServiceEvents(RuntimeServices& runtimeServices, RenderEngine& renderEngine) { std::vector appliedOscUpdates; std::vector completedOscCommits; @@ -31,7 +34,7 @@ void RuntimeServiceLiveBridge::DrainServiceEvents(RuntimeServices& runtimeServic renderEngine.UpdateOscOverlayState(overlayUpdates, overlayCommitCompletions); } -void RuntimeServiceLiveBridge::QueueServiceCommitRequests( +void QueueServiceCommitRequests( RuntimeServices& runtimeServices, const std::vector& commitRequests) { @@ -51,6 +54,7 @@ void RuntimeServiceLiveBridge::QueueServiceCommitRequests( } } } +} bool RuntimeServiceLiveBridge::PrepareLiveRenderLayerStates( RuntimeServices& runtimeServices, diff --git a/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServiceLiveBridge.h b/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServiceLiveBridge.h index 6a813c8..b93e0f8 100644 --- a/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServiceLiveBridge.h +++ b/apps/LoopThroughWithOpenGLCompositing/control/RuntimeServiceLiveBridge.h @@ -1,18 +1,15 @@ #pragma once -#include "RenderEngine.h" +#include "ShaderTypes.h" #include +class RenderEngine; class RuntimeServices; class RuntimeServiceLiveBridge { public: - static void DrainServiceEvents(RuntimeServices& runtimeServices, RenderEngine& renderEngine); - static void QueueServiceCommitRequests( - RuntimeServices& runtimeServices, - const std::vector& commitRequests); static bool PrepareLiveRenderLayerStates( RuntimeServices& runtimeServices, RenderEngine& renderEngine, diff --git a/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp b/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp index 65a79d9..856f781 100644 --- a/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp +++ b/apps/LoopThroughWithOpenGLCompositing/gl/OpenGLComposite.cpp @@ -1,12 +1,10 @@ #include "DeckLinkDisplayMode.h" #include "OpenGLComposite.h" #include "GLExtensions.h" -#include "GlRenderConstants.h" #include "PngScreenshotWriter.h" #include "RenderEngine.h" #include "RuntimeCoordinator.h" #include "RuntimeEventDispatcher.h" -#include "RuntimeParameterUtils.h" #include "RuntimeServiceLiveBridge.h" #include "RuntimeServices.h" #include "RuntimeSnapshotProvider.h" @@ -15,23 +13,15 @@ #include "ShaderBuildQueue.h" #include "VideoBackend.h" -#include -#include #include -#include #include #include #include #include -#include #include #include #include -namespace -{ -} - OpenGLComposite::OpenGLComposite(HWND hWnd, HDC hDC, HGLRC hRC) : hGLWnd(hWnd), hGLDC(hDC), hGLRC(hRC), mScreenshotRequested(false) diff --git a/apps/LoopThroughWithOpenGLCompositing/gl/RenderEngine.h b/apps/LoopThroughWithOpenGLCompositing/gl/RenderEngine.h index 8efc8e6..451e59a 100644 --- a/apps/LoopThroughWithOpenGLCompositing/gl/RenderEngine.h +++ b/apps/LoopThroughWithOpenGLCompositing/gl/RenderEngine.h @@ -14,7 +14,6 @@ #include #include #include -#include #include #include diff --git a/docs/PHASE_3_LIVE_STATE_SERVICE_COORDINATION_DESIGN.md b/docs/PHASE_3_LIVE_STATE_SERVICE_COORDINATION_DESIGN.md index 3adff9a..c251e97 100644 --- a/docs/PHASE_3_LIVE_STATE_SERVICE_COORDINATION_DESIGN.md +++ b/docs/PHASE_3_LIVE_STATE_SERVICE_COORDINATION_DESIGN.md @@ -62,18 +62,13 @@ Those are later phases. Phase 3 is about making state and service coordination c ## Current Coordination Shape -`OpenGLComposite::renderEffect()` currently performs a lot of cross-subsystem coordination: +`OpenGLComposite::renderEffect()` is now narrower, but it still owns the frame entrypoint: 1. pumps `RuntimeUpdateController::ProcessRuntimeWork()` -2. asks `RuntimeServices` to apply pending OSC updates -3. asks `RuntimeServices` for completed OSC commits -4. converts service read models into `RenderEngine::OscOverlayUpdate` and `OscOverlayCommitCompletion` -5. applies those overlay changes to `RenderEngine` -6. asks `RenderEngine` to resolve final render layer states -7. queues OSC commit requests back into `RuntimeServices` -8. asks `RenderEngine` to draw the layer stack +2. asks `RuntimeServiceLiveBridge` to prepare live render layer states +3. asks `RenderEngine` to draw the layer stack -That works, but it keeps the current frame path responsible for service queue draining, live automation settlement, committed/live state selection, and final render-state composition. Phase 3 should turn that into explicit read models and event bridges. +The bridge now owns service queue draining, live automation settlement, committed/live state selection, and OSC commit handoff. `RenderEngine` still owns snapshot cache selection and dynamic render-field refresh, which is the remaining boundary to clarify before Phase 4. ## Target State Model @@ -132,9 +127,9 @@ Non-responsibilities: - disk persistence - OSC packet parsing -### `RuntimeServiceEventBridge` +### `RuntimeServiceLiveBridge` -This may be a new class or a narrowing of `RuntimeUpdateController`/`RuntimeServices`. +`RuntimeServiceLiveBridge` is the current source-local bridge between services, live state, and render-state preparation. Responsibilities: diff --git a/tests/RuntimeSubsystemTests.cpp b/tests/RuntimeSubsystemTests.cpp index 25619d6..110b7a3 100644 --- a/tests/RuntimeSubsystemTests.cpp +++ b/tests/RuntimeSubsystemTests.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include