mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Extend thread expansion grace period to half a second.
Previously a framerate-dependent 10 frame count was used.
This commit is contained in:
parent
38f156259c
commit
c82bf3915b
@ -1166,7 +1166,21 @@ bool View::DrawImpl()
|
||||
m_lockInfoAnim.Update( io.DeltaTime );
|
||||
m_statBuzzAnim.Update( io.DeltaTime );
|
||||
|
||||
if( m_firstFrame > 0 ) m_firstFrame--;
|
||||
if( m_firstFrame )
|
||||
{
|
||||
const auto now = std::chrono::high_resolution_clock::now();
|
||||
if( m_firstFrameTime.time_since_epoch().count() == 0 )
|
||||
{
|
||||
m_firstFrameTime = now;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( std::chrono::duration_cast<std::chrono::milliseconds>( now - m_firstFrameTime ).count() > 500 )
|
||||
{
|
||||
m_firstFrame = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if( m_reactToCrash )
|
||||
{
|
||||
@ -2784,7 +2798,7 @@ void View::AdjustThreadHeight( View::VisData& vis, int oldOffset, int& offset )
|
||||
}
|
||||
else if( vis.height < h )
|
||||
{
|
||||
if( m_firstFrame > 0 )
|
||||
if( m_firstFrame )
|
||||
{
|
||||
vis.height = h;
|
||||
offset = oldOffset + h;
|
||||
|
@ -485,7 +485,8 @@ private:
|
||||
UserData m_userData;
|
||||
|
||||
bool m_reconnectRequested = false;
|
||||
int m_firstFrame = 10;
|
||||
bool m_firstFrame = true;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> m_firstFrameTime;
|
||||
float m_yDelta;
|
||||
|
||||
std::vector<SourceRegex> m_sourceSubstitutions;
|
||||
|
Loading…
Reference in New Issue
Block a user