Clean up pass
This commit is contained in:
@@ -1,10 +1,13 @@
|
|||||||
#include "RuntimeServiceLiveBridge.h"
|
#include "RuntimeServiceLiveBridge.h"
|
||||||
|
|
||||||
|
#include "RenderEngine.h"
|
||||||
#include "RuntimeServices.h"
|
#include "RuntimeServices.h"
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
void RuntimeServiceLiveBridge::DrainServiceEvents(RuntimeServices& runtimeServices, RenderEngine& renderEngine)
|
namespace
|
||||||
|
{
|
||||||
|
void DrainServiceEvents(RuntimeServices& runtimeServices, RenderEngine& renderEngine)
|
||||||
{
|
{
|
||||||
std::vector<RuntimeServices::AppliedOscUpdate> appliedOscUpdates;
|
std::vector<RuntimeServices::AppliedOscUpdate> appliedOscUpdates;
|
||||||
std::vector<RuntimeServices::CompletedOscCommit> completedOscCommits;
|
std::vector<RuntimeServices::CompletedOscCommit> completedOscCommits;
|
||||||
@@ -31,7 +34,7 @@ void RuntimeServiceLiveBridge::DrainServiceEvents(RuntimeServices& runtimeServic
|
|||||||
renderEngine.UpdateOscOverlayState(overlayUpdates, overlayCommitCompletions);
|
renderEngine.UpdateOscOverlayState(overlayUpdates, overlayCommitCompletions);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RuntimeServiceLiveBridge::QueueServiceCommitRequests(
|
void QueueServiceCommitRequests(
|
||||||
RuntimeServices& runtimeServices,
|
RuntimeServices& runtimeServices,
|
||||||
const std::vector<RenderEngine::OscOverlayCommitRequest>& commitRequests)
|
const std::vector<RenderEngine::OscOverlayCommitRequest>& commitRequests)
|
||||||
{
|
{
|
||||||
@@ -51,6 +54,7 @@ void RuntimeServiceLiveBridge::QueueServiceCommitRequests(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool RuntimeServiceLiveBridge::PrepareLiveRenderLayerStates(
|
bool RuntimeServiceLiveBridge::PrepareLiveRenderLayerStates(
|
||||||
RuntimeServices& runtimeServices,
|
RuntimeServices& runtimeServices,
|
||||||
|
|||||||
@@ -1,18 +1,15 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "RenderEngine.h"
|
#include "ShaderTypes.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
class RenderEngine;
|
||||||
class RuntimeServices;
|
class RuntimeServices;
|
||||||
|
|
||||||
class RuntimeServiceLiveBridge
|
class RuntimeServiceLiveBridge
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static void DrainServiceEvents(RuntimeServices& runtimeServices, RenderEngine& renderEngine);
|
|
||||||
static void QueueServiceCommitRequests(
|
|
||||||
RuntimeServices& runtimeServices,
|
|
||||||
const std::vector<RenderEngine::OscOverlayCommitRequest>& commitRequests);
|
|
||||||
static bool PrepareLiveRenderLayerStates(
|
static bool PrepareLiveRenderLayerStates(
|
||||||
RuntimeServices& runtimeServices,
|
RuntimeServices& runtimeServices,
|
||||||
RenderEngine& renderEngine,
|
RenderEngine& renderEngine,
|
||||||
|
|||||||
@@ -1,12 +1,10 @@
|
|||||||
#include "DeckLinkDisplayMode.h"
|
#include "DeckLinkDisplayMode.h"
|
||||||
#include "OpenGLComposite.h"
|
#include "OpenGLComposite.h"
|
||||||
#include "GLExtensions.h"
|
#include "GLExtensions.h"
|
||||||
#include "GlRenderConstants.h"
|
|
||||||
#include "PngScreenshotWriter.h"
|
#include "PngScreenshotWriter.h"
|
||||||
#include "RenderEngine.h"
|
#include "RenderEngine.h"
|
||||||
#include "RuntimeCoordinator.h"
|
#include "RuntimeCoordinator.h"
|
||||||
#include "RuntimeEventDispatcher.h"
|
#include "RuntimeEventDispatcher.h"
|
||||||
#include "RuntimeParameterUtils.h"
|
|
||||||
#include "RuntimeServiceLiveBridge.h"
|
#include "RuntimeServiceLiveBridge.h"
|
||||||
#include "RuntimeServices.h"
|
#include "RuntimeServices.h"
|
||||||
#include "RuntimeSnapshotProvider.h"
|
#include "RuntimeSnapshotProvider.h"
|
||||||
@@ -15,23 +13,15 @@
|
|||||||
#include "ShaderBuildQueue.h"
|
#include "ShaderBuildQueue.h"
|
||||||
#include "VideoBackend.h"
|
#include "VideoBackend.h"
|
||||||
|
|
||||||
#include <algorithm>
|
|
||||||
#include <cctype>
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cmath>
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <set>
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
namespace
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
OpenGLComposite::OpenGLComposite(HWND hWnd, HDC hDC, HGLRC hRC) :
|
OpenGLComposite::OpenGLComposite(HWND hWnd, HDC hDC, HGLRC hRC) :
|
||||||
hGLWnd(hWnd), hGLDC(hDC), hGLRC(hRC),
|
hGLWnd(hWnd), hGLDC(hDC), hGLRC(hRC),
|
||||||
mScreenshotRequested(false)
|
mScreenshotRequested(false)
|
||||||
|
|||||||
@@ -14,7 +14,6 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <map>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|||||||
@@ -62,18 +62,13 @@ Those are later phases. Phase 3 is about making state and service coordination c
|
|||||||
|
|
||||||
## Current Coordination Shape
|
## 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()`
|
1. pumps `RuntimeUpdateController::ProcessRuntimeWork()`
|
||||||
2. asks `RuntimeServices` to apply pending OSC updates
|
2. asks `RuntimeServiceLiveBridge` to prepare live render layer states
|
||||||
3. asks `RuntimeServices` for completed OSC commits
|
3. asks `RenderEngine` to draw the layer stack
|
||||||
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
|
|
||||||
|
|
||||||
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
|
## Target State Model
|
||||||
|
|
||||||
@@ -132,9 +127,9 @@ Non-responsibilities:
|
|||||||
- disk persistence
|
- disk persistence
|
||||||
- OSC packet parsing
|
- 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:
|
Responsibilities:
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,6 @@
|
|||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <map>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <variant>
|
#include <variant>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user