Set up capturing to flatten/deinterleave deferred context recording

This commit is contained in:
baldurk
2016-09-05 20:12:40 +02:00
parent 1bd55068e3
commit 78ef96b2e7
9 changed files with 74 additions and 25 deletions
+19
View File
@@ -279,6 +279,25 @@ Chunk::Chunk(Serialiser *ser, uint32_t chunkType, bool temporary)
#endif
}
Chunk *Chunk::Duplicate()
{
Chunk *ret = new Chunk();
ret->m_DebugStr = m_DebugStr;
ret->m_Length = m_Length;
ret->m_ChunkType = m_ChunkType;
ret->m_Temporary = m_Temporary;
ret->m_AlignedData = m_AlignedData;
if(m_AlignedData)
ret->m_Data = Serialiser::AllocAlignedBuffer(m_Length);
else
ret->m_Data = new byte[m_Length];
memcpy(ret->m_Data, m_Data, m_Length);
return ret;
}
Chunk::~Chunk()
{
#if !defined(RELEASE)
+3
View File
@@ -113,7 +113,10 @@ public:
// grab current contents of the serialiser into this chunk
Chunk(Serialiser *ser, uint32_t chunkType, bool temp);
Chunk *Duplicate();
private:
Chunk() {}
// no copy semantics
Chunk(const Chunk &);
Chunk &operator=(const Chunk &);