mirror of
https://github.com/wolfpld/tracy
synced 2025-05-03 06:03:51 +00:00
Store frame reference in frame images.
This commit is contained in:
parent
38b76ea32d
commit
eb6ac5e6e1
@ -362,6 +362,7 @@ struct FrameImage
|
|||||||
const char* ptr;
|
const char* ptr;
|
||||||
uint32_t csz;
|
uint32_t csz;
|
||||||
uint16_t w, h;
|
uint16_t w, h;
|
||||||
|
uint32_t frameRef;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1262,6 +1262,17 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
|
|||||||
m_data.frameImage[i] = fi;
|
m_data.frameImage[i] = fi;
|
||||||
}
|
}
|
||||||
delete[] tmpbuf;
|
delete[] tmpbuf;
|
||||||
|
|
||||||
|
const auto& frames = GetFramesBase()->frames;
|
||||||
|
const auto fsz = uint32_t( frames.size() );
|
||||||
|
for( uint32_t i=0; i<fsz; i++ )
|
||||||
|
{
|
||||||
|
const auto& f = frames[i];
|
||||||
|
if( f.frameImage != -1 )
|
||||||
|
{
|
||||||
|
m_data.frameImage[f.frameImage]->frameRef = i;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -3008,6 +3019,7 @@ void Worker::ProcessFrameImage( const QueueFrameImage& ev )
|
|||||||
fi->ptr = PackFrameImage( (const char*)it->second, ev.w, ev.h, fi->csz );
|
fi->ptr = PackFrameImage( (const char*)it->second, ev.w, ev.h, fi->csz );
|
||||||
fi->w = ev.w;
|
fi->w = ev.w;
|
||||||
fi->h = ev.h;
|
fi->h = ev.h;
|
||||||
|
fi->frameRef = fidx;
|
||||||
|
|
||||||
const auto idx = m_data.frameImage.size();
|
const auto idx = m_data.frameImage.size();
|
||||||
m_data.frameImage.push_back( fi );
|
m_data.frameImage.push_back( fi );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user