refactor(editor): neutralize render surface handoff

This commit is contained in:
2026-04-27 17:17:29 +08:00
parent 2a7f6d0b60
commit 0d97cb5e51
7 changed files with 44 additions and 59 deletions

View File

@@ -3,7 +3,6 @@
#include "Platform/Win32/Chrome/EditorWindowChromeController.h"
#include "Platform/Win32/Windowing/EditorWindowSession.h"
#include "Platform/Win32/Windowing/EditorWindowSupport.h"
#include "Platform/Win32/Windowing/Win32EditorWindowRenderRuntimeSurface.h"
#include "Platform/Win32/Runtime/EditorWindowInputController.h"
#include "Windowing/Host/EditorWindowContentBindings.h"
#include <XCEditor/Docking/UIEditorDockHostTransfer.h>
@@ -181,8 +180,10 @@ bool EditorWindow::CaptureRuntimeSurface(
clientHeight = 1u;
}
outSurface.renderSurface =
std::make_shared<Win32EditorWindowRenderRuntimeSurface>(hwnd);
outSurface.renderSurface = Rendering::Host::EditorWindowRenderRuntimeSurface{
.kind = Rendering::Host::EditorWindowRenderRuntimeSurfaceKind::Win32Window,
.nativeHandle = reinterpret_cast<std::uintptr_t>(hwnd),
};
outSurface.widthPixels = clientWidth;
outSurface.heightPixels = clientHeight;
outSurface.dpiScale = GetDpiScale();