more seperation

This commit is contained in:
Aiden
2026-05-10 23:53:27 +10:00
parent 7f0f60c0e3
commit 41075bbc61
25 changed files with 733 additions and 1031 deletions

View File

@@ -1,7 +1,8 @@
#include "OpenGLRenderPipeline.h"
#include "HealthTelemetry.h"
#include "OpenGLRenderer.h"
#include "RuntimeHost.h"
#include "RuntimeSnapshotProvider.h"
#include "VideoIOFormat.h"
#include <cstring>
@@ -11,12 +12,14 @@
OpenGLRenderPipeline::OpenGLRenderPipeline(
OpenGLRenderer& renderer,
RuntimeHost& runtimeHost,
RuntimeSnapshotProvider& runtimeSnapshotProvider,
HealthTelemetry& healthTelemetry,
RenderEffectCallback renderEffect,
OutputReadyCallback outputReady,
PaintCallback paint) :
mRenderer(renderer),
mRuntimeHost(runtimeHost),
mRuntimeSnapshotProvider(runtimeSnapshotProvider),
mHealthTelemetry(healthTelemetry),
mRenderEffect(renderEffect),
mOutputReady(outputReady),
mPaint(paint)
@@ -47,8 +50,8 @@ bool OpenGLRenderPipeline::RenderFrame(const RenderPipelineFrameContext& context
const auto renderEndTime = std::chrono::steady_clock::now();
const double renderMilliseconds = std::chrono::duration_cast<std::chrono::duration<double, std::milli>>(renderEndTime - renderStartTime).count();
mRuntimeHost.GetHealthTelemetry().TryRecordPerformanceStats(state.frameBudgetMilliseconds, renderMilliseconds);
mRuntimeHost.TryAdvanceFrame();
mHealthTelemetry.TryRecordPerformanceStats(state.frameBudgetMilliseconds, renderMilliseconds);
mRuntimeSnapshotProvider.TryAdvanceFrame();
ReadOutputFrame(state, outputFrame);
if (mPaint)