editor: centralize engine runtime access

This commit is contained in:
2026-04-28 17:23:10 +08:00
parent 23aab98a09
commit 357dc136fe
36 changed files with 337 additions and 102 deletions

View File

@@ -45,10 +45,12 @@ bool LoadHostPngTexture(
EditorWindowRuntimeController::EditorWindowRuntimeController(
EditorFrameServices& frameServices,
EditorEngineServices& engineServices,
Host::EditorHostResourceService& resourceService,
std::unique_ptr<EditorWindowContentController> contentController,
std::unique_ptr<Rendering::Host::EditorWindowRenderRuntime> renderRuntime)
: m_frameServices(frameServices)
, m_engineServices(engineServices)
, m_resourceService(resourceService)
, m_renderRuntime(std::move(renderRuntime))
, m_contentController(std::move(contentController)) {}
@@ -172,6 +174,7 @@ bool EditorWindowRuntimeController::Initialize(
.resourceService = m_resourceService,
.textMeasurer = m_renderRuntime->GetTextMeasurer(),
.viewportRenderer = m_renderRuntime->GetViewportRenderHost(),
.engineServices = m_engineServices,
});
m_contentController->SetViewportSurfacePresentationEnabled(
initializeResult.hasViewportSurfacePresentation);