mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-04-25 08:06:30 +00:00
[idd] handle frame re-send for when a new client connects
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
This commit is contained in:
parent
ce23cff12e
commit
7a88a49f1c
@ -339,6 +339,8 @@ bool CIndirectDeviceContext::SetupLGMP(size_t alignSize)
|
||||
|
||||
void CIndirectDeviceContext::DeInitLGMP()
|
||||
{
|
||||
m_hasFrame = false;
|
||||
|
||||
if (m_lgmp == nullptr)
|
||||
return;
|
||||
|
||||
@ -394,9 +396,8 @@ void CIndirectDeviceContext::LGMPTimer()
|
||||
|
||||
if (lgmpHostQueueNewSubs(m_frameQueue) && m_monitor)
|
||||
{
|
||||
auto* wrapper = WdfObjectGet_CIndirectMonitorContextWrapper(m_monitor);
|
||||
if (wrapper)
|
||||
wrapper->context->ResendLastFrame();
|
||||
if (m_hasFrame)
|
||||
lgmpHostQueuePost(m_frameQueue, 0, m_frameMemory[m_frameIndex]);
|
||||
}
|
||||
|
||||
if (lgmpHostQueueNewSubs(m_pointerQueue))
|
||||
@ -478,6 +479,7 @@ CIndirectDeviceContext::PreparedFrameBuffer CIndirectDeviceContext::PrepareFrame
|
||||
result.frameIndex = m_frameIndex;
|
||||
result.mem = fb->data;
|
||||
|
||||
m_hasFrame = true;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -67,6 +67,7 @@ private:
|
||||
int m_height = 0;
|
||||
int m_pitch = 0;
|
||||
DXGI_FORMAT m_format = DXGI_FORMAT_UNKNOWN;
|
||||
bool m_hasFrame = false;
|
||||
|
||||
void DeInitLGMP();
|
||||
void LGMPTimer();
|
||||
|
@ -58,12 +58,6 @@ public:
|
||||
|
||||
void AssignSwapChain(IDDCX_SWAPCHAIN swapChain, LUID renderAdapter, HANDLE newFrameEvent);
|
||||
void UnassignSwapChain();
|
||||
|
||||
inline void ResendLastFrame()
|
||||
{
|
||||
if (m_swapChain)
|
||||
m_swapChain->ResendLastFrame();
|
||||
}
|
||||
};
|
||||
|
||||
struct CIndirectMonitorContextWrapper
|
||||
|
@ -218,22 +218,3 @@ void CSwapChainProcessor::SwapChainNewFrame(ComPtr<IDXGIResource> acquiredBuffer
|
||||
|
||||
m_devContext->FinalizeFrameBuffer();
|
||||
}
|
||||
|
||||
void CSwapChainProcessor::ResendLastFrame()
|
||||
{
|
||||
/*
|
||||
LOCK_CONTEXT()
|
||||
StagingTexture & st = m_cpuTex[m_lastIndex];
|
||||
LOCK_ST(st);
|
||||
UNLOCK_CONTEXT();
|
||||
|
||||
if (!st.map.pData)
|
||||
{
|
||||
UNLOCK_ST(st);
|
||||
return;
|
||||
}
|
||||
|
||||
m_devContext->SendFrame(st.width, st.height, st.map.RowPitch, st.format, st.map.pData);
|
||||
UNLOCK_ST(st);
|
||||
*/
|
||||
}
|
@ -63,6 +63,4 @@ public:
|
||||
|
||||
CIndirectDeviceContext * GetDevice() { return m_devContext; }
|
||||
std::shared_ptr<CD3D12Device> GetD3D12Device() { return m_dx12Device; }
|
||||
|
||||
void ResendLastFrame();
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user