new_editor: close legacy d2d host path

This commit is contained in:
2026-04-22 02:14:26 +08:00
parent 35e7602eb8
commit 36c4ae414b
19 changed files with 876 additions and 1894 deletions

View File

@@ -58,6 +58,7 @@ void D3D12WindowRenderer::Shutdown() {
TraceRenderer("D3D12WindowRenderer::Shutdown begin", this);
m_textureCpuHandles.clear();
m_textureAllocator.Shutdown();
m_capture.Shutdown();
m_presenter.Shutdown();
m_hostDevice.Shutdown();
m_activeFrameSlot = 0u;
@@ -153,6 +154,16 @@ bool D3D12WindowRenderer::PresentFrame() {
return presented;
}
bool D3D12WindowRenderer::CaptureCurrentBackBufferToPng(
const std::filesystem::path& outputPath,
std::string& outError) {
const bool captured = m_capture.CaptureCurrentBackBufferToPng(*this, outputPath, outError);
if (!captured && outError.empty()) {
outError = "CaptureCurrentBackBufferToPng failed.";
}
return captured;
}
void D3D12WindowRenderer::WaitForGpuIdle() {
TraceRenderer("D3D12WindowRenderer::WaitForGpuIdle begin", this);
m_hostDevice.WaitForGpuIdle();