From d5552565465d6f893032721fc3bcc47ccffe2344 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 15 May 2021 17:34:00 +0200 Subject: [PATCH] Don't use separate texture compression context. Previously it was needed, as saving could be made at the same time the UI was active. Currently saving blocks UI access to data structures, as it possibly may need to sort unsorted vectors. --- server/TracyWorker.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/TracyWorker.cpp b/server/TracyWorker.cpp index 5a8c42f5..404033bf 100644 --- a/server/TracyWorker.cpp +++ b/server/TracyWorker.cpp @@ -7269,7 +7269,6 @@ void Worker::Write( FileWrite& f, bool fiDict ) if( sz != 0 ) f.Write( m_data.appInfo.data(), sizeof( m_data.appInfo[0] ) * sz ); { - TextureCompression texcomp; sz = m_data.frameImage.size(); if( fiDict ) { @@ -7292,7 +7291,7 @@ void Worker::Write( FileWrite& f, bool fiDict ) { const auto& fi = m_data.frameImage[i]; const auto fisz = fi->w * fi->h / 2; - const auto image = texcomp.Unpack( *fi ); + const auto image = m_texcomp.Unpack( *fi ); memcpy( sdata+offset, image, fisz ); ssize[i] = fisz; offset += fisz; @@ -7329,7 +7328,7 @@ void Worker::Write( FileWrite& f, bool fiDict ) f.Write( &fi->w, sizeof( fi->w ) ); f.Write( &fi->h, sizeof( fi->h ) ); f.Write( &fi->flip, sizeof( fi->flip ) ); - const auto image = texcomp.Unpack( *fi ); + const auto image = m_texcomp.Unpack( *fi ); f.Write( image, fi->w * fi->h / 2 ); } }