mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-11 18:08:08 +00:00
[idd] driver: use the frameSize instead of the resource size
As the resource size can be larger then the actual frame data, we need to track this seperately so that we don't waste cycles copying data the client will never use.
This commit is contained in:
@@ -12,7 +12,10 @@ bool CFrameBufferResource::Init(CSwapChainProcessor * swapChain, uint8_t * base,
|
||||
|
||||
// nothing to do if the resource already exists and is large enough
|
||||
if (m_base == base && m_size >= size)
|
||||
{
|
||||
m_frameSize = size;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reset();
|
||||
|
||||
@@ -87,9 +90,10 @@ bool CFrameBufferResource::Init(CSwapChainProcessor * swapChain, uint8_t * base,
|
||||
|
||||
m_res->SetName(resName);
|
||||
|
||||
m_base = base;
|
||||
m_size = size;
|
||||
m_valid = true;
|
||||
m_base = base;
|
||||
m_size = size;
|
||||
m_frameSize = size;
|
||||
m_valid = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user