new_editor: stabilize resize lifecycle groundwork
This commit is contained in:
@@ -120,14 +120,6 @@ D3D12WindowRenderLoopPresentResult D3D12WindowRenderLoop::Present(
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!m_windowRenderer->SignalFrameCompletion()) {
|
||||
const std::string& error = m_windowRenderer->GetLastError();
|
||||
result.warning = error.empty()
|
||||
? "failed to signal current frame completion."
|
||||
: error;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (captureOutputPath != nullptr) {
|
||||
std::string captureError = {};
|
||||
if (!m_windowRenderer->CaptureCurrentBackBufferToPng(*captureOutputPath, captureError)) {
|
||||
@@ -139,14 +131,24 @@ D3D12WindowRenderLoopPresentResult D3D12WindowRenderLoop::Present(
|
||||
}
|
||||
}
|
||||
|
||||
if (!m_windowRenderer->PresentFrame()) {
|
||||
const bool presented = m_windowRenderer->PresentFrame();
|
||||
const std::string presentError = m_windowRenderer->GetLastError();
|
||||
|
||||
if (!m_windowRenderer->SignalFrameCompletion()) {
|
||||
const std::string& error = m_windowRenderer->GetLastError();
|
||||
result.warning = error.empty()
|
||||
? "failed to present the swap chain."
|
||||
? "failed to signal current frame completion."
|
||||
: error;
|
||||
return result;
|
||||
}
|
||||
|
||||
if (!presented) {
|
||||
result.warning = presentError.empty()
|
||||
? "failed to present the swap chain."
|
||||
: presentError;
|
||||
return result;
|
||||
}
|
||||
|
||||
result.framePresented = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user