checkpoint(new_editor): native d3d12 ui path

Key node 1: move main-window UI presentation onto the D3D12 render loop with native UI renderer, text system, and texture host.

Key node 2: wire frame timing/FPS display, window runtime, swapchain presentation, and native screenshot capture around the new path.

Key node 3: carry editor shell/workspace/viewport/panel interaction updates needed by the new renderer and detached window flow.

Key node 4: pump async resource loads and scene bridge follow-up needed for scene content visibility in new_editor.
This commit is contained in:
2026-04-21 20:49:18 +08:00
parent a779b04dba
commit 6e9265e92e
53 changed files with 5330 additions and 858 deletions

View File

@@ -2,6 +2,7 @@
#include "Composition/EditorShellAssetBuilder.h"
#include "Scene/EditorSceneRuntime.h"
#include "Composition/EditorPanelIds.h"
#include <XCEditor/Foundation/UIEditorRuntimeTrace.h>
#include <sstream>
#include <utility>
@@ -11,6 +12,7 @@ namespace {
using ::XCEngine::UI::Editor::BuildEditorShellShortcutManager;
using ::XCEngine::UI::Editor::UIEditorWorkspacePanelPresentationModel;
using ::XCEngine::UI::Editor::AppendUIEditorRuntimeTrace;
std::string ComposeStatusText(
std::string_view status,
@@ -41,8 +43,14 @@ UIEditorWorkspacePanelPresentationModel* FindMutablePresentation(
} // namespace
bool EditorContext::Initialize(const std::filesystem::path& repoRoot) {
AppendUIEditorRuntimeTrace("startup", "EditorContext::Initialize begin");
m_shellAsset = BuildEditorApplicationShellAsset(repoRoot);
AppendUIEditorRuntimeTrace("startup", "BuildEditorApplicationShellAsset complete");
m_shellValidation = ValidateEditorShellAsset(m_shellAsset);
AppendUIEditorRuntimeTrace(
"startup",
std::string("ValidateEditorShellAsset complete valid=") +
(m_shellValidation.IsValid() ? "1" : "0"));
if (!m_shellValidation.IsValid()) {
return false;
}
@@ -53,10 +61,14 @@ bool EditorContext::Initialize(const std::filesystem::path& repoRoot) {
m_commandFocusService = {};
m_selectionService = {};
m_projectRuntime = {};
AppendUIEditorRuntimeTrace("startup", "EditorProjectRuntime::Initialize begin");
m_projectRuntime.Initialize(repoRoot);
AppendUIEditorRuntimeTrace("startup", "EditorProjectRuntime::Initialize end");
m_projectRuntime.BindSelectionService(&m_selectionService);
m_sceneRuntime = {};
AppendUIEditorRuntimeTrace("startup", "EditorSceneRuntime::Initialize begin");
m_sceneRuntime.Initialize(m_session.projectRoot);
AppendUIEditorRuntimeTrace("startup", "EditorSceneRuntime::Initialize end");
m_sceneRuntime.BindSelectionService(&m_selectionService);
ResetEditorColorPickerToolState(m_colorPickerToolState);
SyncSessionFromSelectionService();
@@ -69,6 +81,7 @@ bool EditorContext::Initialize(const std::filesystem::path& repoRoot) {
m_shellServices.commandDispatcher = &m_shortcutManager.GetCommandDispatcher();
m_shellServices.shortcutManager = &m_shortcutManager;
SetReadyStatus();
AppendUIEditorRuntimeTrace("startup", "EditorContext::Initialize end");
return true;
}