mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Don't track last frames in offline mode.
This commit is contained in:
parent
2165881efc
commit
9342ba0e71
@ -323,7 +323,7 @@ View::View( FileRead& f, ImFont* fixedWidth, SetTitleCallback stcb )
|
||||
: m_worker( f )
|
||||
, m_staticView( true )
|
||||
, m_frameScale( 0 )
|
||||
, m_pause( false )
|
||||
, m_pause( true )
|
||||
, m_frameStart( 0 )
|
||||
, m_zvStart( 0 )
|
||||
, m_zvEnd( 0 )
|
||||
@ -363,6 +363,7 @@ View::View( FileRead& f, ImFont* fixedWidth, SetTitleCallback stcb )
|
||||
s_instance = this;
|
||||
|
||||
InitTextEditor();
|
||||
SetViewToLastFrames();
|
||||
}
|
||||
|
||||
View::~View()
|
||||
@ -893,15 +894,7 @@ void View::DrawFrames()
|
||||
if( !m_pause )
|
||||
{
|
||||
m_frameStart = ( total < onScreen * group ) ? 0 : total - onScreen * group;
|
||||
m_zvStart = m_worker.GetFrameBegin( *m_frames, std::max( 0, total - 4 ) );
|
||||
if( total == 1 )
|
||||
{
|
||||
m_zvEnd = m_worker.GetLastTime();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_zvEnd = m_worker.GetFrameBegin( *m_frames, total - 1 );
|
||||
}
|
||||
SetViewToLastFrames();
|
||||
}
|
||||
|
||||
if( hover )
|
||||
@ -8372,4 +8365,19 @@ void View::SmallCallstackButton( const char* name, uint32_t callstack, int& idx
|
||||
}
|
||||
}
|
||||
|
||||
void View::SetViewToLastFrames()
|
||||
{
|
||||
const int total = m_worker.GetFrameCount( *m_frames );
|
||||
|
||||
m_zvStart = m_worker.GetFrameBegin( *m_frames, std::max( 0, total - 4 ) );
|
||||
if( total == 1 )
|
||||
{
|
||||
m_zvEnd = m_worker.GetLastTime();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_zvEnd = m_worker.GetFrameBegin( *m_frames, total - 1 );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -150,6 +150,7 @@ private:
|
||||
const char* GetPlotName( const PlotData* plot ) const;
|
||||
|
||||
void SmallCallstackButton( const char* name, uint32_t callstack, int& idx );
|
||||
void SetViewToLastFrames();
|
||||
|
||||
flat_hash_map<const void*, bool, nohash<const void*>> m_visible;
|
||||
flat_hash_map<uint64_t, bool, nohash<uint64_t>> m_visibleMsgThread;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user