mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Don't pass GetFrameOffset() results to GetFrameText().
Frame offset can be retrieved internally.
This commit is contained in:
parent
9155b01ddf
commit
8164b776fd
@ -317,7 +317,7 @@ private:
|
||||
bool FindMatchingZone( int prev0, int prev1, int flags );
|
||||
const ZoneEvent* FindZoneAtTime( uint64_t thread, int64_t time ) const;
|
||||
uint64_t GetFrameNumber( const FrameData& fd, int i, uint64_t offset ) const;
|
||||
const char* GetFrameText( const FrameData& fd, int i, uint64_t ftime, uint64_t offset ) const;
|
||||
const char* GetFrameText( const FrameData& fd, int i, uint64_t ftime ) const;
|
||||
const char* GetFrameSetName( const FrameData& fd ) const;
|
||||
static const char* GetFrameSetName( const FrameData& fd, const Worker& worker );
|
||||
|
||||
|
@ -144,7 +144,7 @@ void View::DrawTimelineFrames( const FrameData& frames )
|
||||
if( IsMouseClickReleased( 1 ) ) m_setRangePopup = RangeSlim { fbegin, fend, true };
|
||||
|
||||
ImGui::BeginTooltip();
|
||||
ImGui::TextUnformatted( GetFrameText( frames, i, ftime, m_worker.GetFrameOffset() ) );
|
||||
ImGui::TextUnformatted( GetFrameText( frames, i, ftime ) );
|
||||
ImGui::SameLine();
|
||||
ImGui::TextDisabled( "(%.1f FPS)", 1000000000.0 / ftime );
|
||||
TextFocused( "Time from start of program:", TimeToStringExact( m_worker.GetFrameBegin( frames, i ) ) );
|
||||
@ -244,7 +244,7 @@ void View::DrawTimelineFrames( const FrameData& frames )
|
||||
endPos = fend;
|
||||
}
|
||||
|
||||
auto buf = GetFrameText( frames, i, ftime, m_worker.GetFrameOffset() );
|
||||
auto buf = GetFrameText( frames, i, ftime );
|
||||
auto tx = ImGui::CalcTextSize( buf ).x;
|
||||
uint32_t color = ( frames.name == 0 && i == 0 ) ? redColor : activeColor;
|
||||
|
||||
|
@ -768,9 +768,9 @@ uint64_t View::GetFrameNumber( const FrameData& fd, int i, uint64_t offset ) con
|
||||
}
|
||||
}
|
||||
|
||||
const char* View::GetFrameText( const FrameData& fd, int i, uint64_t ftime, uint64_t offset ) const
|
||||
const char* View::GetFrameText( const FrameData& fd, int i, uint64_t ftime ) const
|
||||
{
|
||||
const auto fnum = GetFrameNumber( fd, i, offset );
|
||||
const auto fnum = GetFrameNumber( fd, i, m_worker.GetFrameOffset() );
|
||||
static char buf[1024];
|
||||
if( fd.name == 0 )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user