1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Frame image may need flipping.

This commit is contained in:
Bartosz Taudul
2019-06-12 15:28:32 +02:00
parent 29fd4b1fe9
commit 37d1457b44
5 changed files with 10 additions and 3 deletions
+3
View File
@@ -1250,6 +1250,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask )
s_loadProgress.subProgress.store( i, std::memory_order_relaxed );
auto fi = m_slab.Alloc<FrameImage>();
f.Read2( fi->w, fi->h );
f.Read( fi->flip );
const auto sz = fi->w * fi->h / 2;
if( tmpbufsz < sz )
{
@@ -3020,6 +3021,7 @@ void Worker::ProcessFrameImage( const QueueFrameImage& ev )
fi->w = ev.w;
fi->h = ev.h;
fi->frameRef = fidx;
fi->flip = ev.flip;
const auto idx = m_data.frameImage.size();
m_data.frameImage.push_back( fi );
@@ -4395,6 +4397,7 @@ void Worker::Write( FileWrite& f )
{
f.Write( &fi->w, sizeof( fi->w ) );
f.Write( &fi->h, sizeof( fi->h ) );
f.Write( &fi->flip, sizeof( fi->flip ) );
const auto image = UnpackFrameImage( *fi );
f.Write( image, fi->w * fi->h / 2 );
}