mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 08:41:31 +00:00
[idd] capture: split software and hardware frame processors
Move cadence-aware hardware capture and immediate software capture behind a common frame processor interface. Keep shared damage tracking and frame-buffer ownership in the base processor, and move stateless format, resource, and rectangle helpers into CFrameProcessorUtil. Decouple frame-buffer resources from CSwapChainProcessor by passing the device dependencies they use directly.
This commit is contained in:
@@ -19,13 +19,14 @@
|
||||
*/
|
||||
|
||||
#include "CFrameBufferPool.h"
|
||||
#include "CSwapChainProcessor.h"
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
void CFrameBufferPool::Init(CSwapChainProcessor * swapChain)
|
||||
void CFrameBufferPool::Init(
|
||||
CIndirectDeviceContext * device, CD3D12Device * dx12)
|
||||
{
|
||||
m_swapChain = swapChain;
|
||||
m_device = device;
|
||||
m_dx12 = dx12;
|
||||
}
|
||||
|
||||
void CFrameBufferPool::Reset()
|
||||
@@ -42,7 +43,7 @@ CFrameBufferResource * CFrameBufferPool::Get(
|
||||
return nullptr;
|
||||
|
||||
CFrameBufferResource * fbr = &m_buffers[buffer.frameIndex];
|
||||
if (!fbr->Init(m_swapChain, buffer.frameIndex, buffer.mem,
|
||||
if (!fbr->Init(m_device, m_dx12, buffer.frameIndex, buffer.mem,
|
||||
minSize, textureDesc))
|
||||
return nullptr;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user