Refactor new editor boundaries and test ownership

This commit is contained in:
2026-04-19 15:52:28 +08:00
parent dc13b56cf3
commit 93f06e84ed
279 changed files with 6349 additions and 3238 deletions

View File

@@ -1,31 +1,9 @@
#include "Bootstrap/Application.h"
#include "Platform/Win32/EditorWindow.h"
#include "Platform/Win32/EditorWindowManager.h"
#include <XCEditor/Foundation/UIEditorRuntimeTrace.h>
namespace XCEngine::UI::Editor {
void Application::TickSmokeTest() {
if (!m_smokeTestEnabled || m_smokeTestCloseRequested || m_windowManager == nullptr) {
return;
}
++m_smokeTestRenderedFrames;
if (m_smokeTestRenderedFrames < m_smokeTestFrameLimit) {
return;
}
if (App::EditorWindow* primaryWindow = m_windowManager->FindPrimaryWindow();
primaryWindow != nullptr &&
primaryWindow->GetHwnd() != nullptr) {
PostMessageW(primaryWindow->GetHwnd(), WM_CLOSE, 0, 0);
m_smokeTestCloseRequested = true;
AppendUIEditorRuntimeTrace("smoke", "frame budget reached, requested WM_CLOSE");
}
}
int Application::Run(HINSTANCE hInstance, int nCmdShow) {
if (!Initialize(hInstance, nCmdShow)) {
Shutdown();
@@ -55,7 +33,6 @@ int Application::Run(HINSTANCE hInstance, int nCmdShow) {
}
m_windowManager->RenderAllWindows();
TickSmokeTest();
} else {
break;
}