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

@@ -613,20 +613,22 @@ EditorWindowFrameTransferRequests EditorWindow::RenderFrame(
const UIRect workspaceBounds = ResolveWorkspaceBounds(width, height);
UIDrawData drawData = {};
UIDrawList& drawList = drawData.EmplaceDrawList("XCEditorShell");
drawList.AddFilledRect(
UIDrawList& backgroundDrawList = drawData.EmplaceDrawList("XCEditorWindow.Surface");
backgroundDrawList.AddFilledRect(
UIRect(0.0f, 0.0f, width, height),
kShellSurfaceColor);
EditorWindowFrameTransferRequests transferRequests = {};
if (editorContext.IsValid()) {
transferRequests =
RenderRuntimeFrame(editorContext, globalTabDragActive, workspaceBounds, drawList);
RenderRuntimeFrame(editorContext, globalTabDragActive, workspaceBounds, drawData);
} else {
m_frameOrchestrator->AppendInvalidFrame(editorContext, drawList);
UIDrawList& invalidDrawList = drawData.EmplaceDrawList("XCEditorWindow.Invalid");
m_frameOrchestrator->AppendInvalidFrame(editorContext, invalidDrawList);
}
AppendBorderlessWindowChrome(drawList, width);
UIDrawList& windowChromeDrawList = drawData.EmplaceDrawList("XCEditorWindow.Chrome");
AppendBorderlessWindowChrome(windowChromeDrawList, width);
const Host::D3D12WindowRenderLoopPresentResult presentResult = m_runtime->Present(drawData);
if (!presentResult.warning.empty()) {
@@ -677,7 +679,7 @@ EditorWindowFrameTransferRequests EditorWindow::RenderRuntimeFrame(
EditorContext& editorContext,
bool globalTabDragActive,
const UIRect& workspaceBounds,
UIDrawList& drawList) {
UIDrawData& drawData) {
SyncShellCapturedPointerButtonsFromSystemState();
std::vector<UIInputEvent> frameEvents = m_inputController->TakePendingEvents();
const bool useDetachedTitleBarTabStrip = ShouldUseDetachedTitleBarTabStrip();
@@ -685,13 +687,13 @@ EditorWindowFrameTransferRequests EditorWindow::RenderRuntimeFrame(
m_frameOrchestrator->UpdateAndAppend(
editorContext,
*m_runtime,
workspaceBounds,
frameEvents,
workspaceBounds,
frameEvents,
m_runtime->BuildCaptureStatusText(),
m_state->window.primary,
globalTabDragActive,
useDetachedTitleBarTabStrip,
drawList);
useDetachedTitleBarTabStrip,
drawData);
ApplyShellRuntimePointerCapture();
ApplyCurrentCursor();