Remove obsolete GetZoneDepth() method.

This commit is contained in:
Bartosz Taudul 2021-02-07 19:58:23 +01:00
parent 02451fecd7
commit 35267abc8e
2 changed files with 0 additions and 33 deletions

View File

@ -17189,38 +17189,6 @@ void View::CrashTooltip()
ImGui::EndTooltip(); ImGui::EndTooltip();
} }
int View::GetZoneDepth( const ZoneEvent& zone, uint64_t tid ) const
{
auto td = m_worker.GetThreadData( tid );
assert( td );
auto timeline = &td->timeline;
int depth = 0;
for(;;)
{
if( timeline->is_magic() )
{
auto vec = (Vector<ZoneEvent>*)timeline;
auto it = std::upper_bound( vec->begin(), vec->end(), zone.Start(), [] ( const auto& l, const auto& r ) { return l < r.Start(); } );
if( it != vec->begin() ) --it;
assert( !( zone.IsEndValid() && it->Start() > zone.End() ) );
if( it == &zone ) return depth;
assert( it->HasChildren() );
timeline = &m_worker.GetZoneChildren( it->Child() );
depth++;
}
else
{
auto it = std::upper_bound( timeline->begin(), timeline->end(), zone.Start(), [] ( const auto& l, const auto& r ) { return l < r->Start(); } );
if( it != timeline->begin() ) --it;
assert( !( zone.IsEndValid() && (*it)->Start() > zone.End() ) );
if( *it == &zone ) return depth;
assert( (*it)->HasChildren() );
timeline = &m_worker.GetZoneChildren( (*it)->Child() );
depth++;
}
}
}
const ZoneEvent* View::GetZoneParent( const ZoneEvent& zone ) const const ZoneEvent* View::GetZoneParent( const ZoneEvent& zone ) const
{ {
for( const auto& thread : m_worker.GetThreadData() ) for( const auto& thread : m_worker.GetThreadData() )

View File

@ -243,7 +243,6 @@ private:
void CallstackTooltip( uint32_t idx ); void CallstackTooltip( uint32_t idx );
void CrashTooltip(); void CrashTooltip();
int GetZoneDepth( const ZoneEvent& zone, uint64_t tid ) const;
const ZoneEvent* GetZoneParent( const ZoneEvent& zone ) const; const ZoneEvent* GetZoneParent( const ZoneEvent& zone ) const;
const ZoneEvent* GetZoneParent( const ZoneEvent& zone, uint64_t tid ) const; const ZoneEvent* GetZoneParent( const ZoneEvent& zone, uint64_t tid ) const;
const GpuEvent* GetZoneParent( const GpuEvent& zone ) const; const GpuEvent* GetZoneParent( const GpuEvent& zone ) const;