mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Only retrieve frame offset internally in GetFrameNumber().
This commit is contained in:
parent
8164b776fd
commit
f9449bc938
@ -316,7 +316,7 @@ private:
|
||||
const GpuCtxData* GetZoneCtx( const GpuEvent& zone ) const;
|
||||
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;
|
||||
uint64_t GetFrameNumber( const FrameData& fd, int i ) 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 );
|
||||
|
@ -141,7 +141,7 @@ void View::DrawFrames()
|
||||
}
|
||||
else
|
||||
{
|
||||
const auto fnum = GetFrameNumber( *m_frames, sel, m_worker.GetFrameOffset() );
|
||||
const auto fnum = GetFrameNumber( *m_frames, sel );
|
||||
m_frameHover = sel;
|
||||
if( m_frames->name == 0 )
|
||||
{
|
||||
|
@ -194,7 +194,7 @@ void View::DrawPlayback()
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
TextFocused( "Frame:", RealToString( GetFrameNumber( *frameSet, fi->frameRef, m_worker.GetFrameOffset() ) ) );
|
||||
TextFocused( "Frame:", RealToString( GetFrameNumber( *frameSet, fi->frameRef ) ) );
|
||||
ImGui::SameLine();
|
||||
ImGui::Spacing();
|
||||
ImGui::SameLine();
|
||||
|
@ -749,10 +749,11 @@ int64_t View::AdjustGpuTime( int64_t time, int64_t begin, int drift )
|
||||
return time + t / 1000000000 * drift;
|
||||
}
|
||||
|
||||
uint64_t View::GetFrameNumber( const FrameData& fd, int i, uint64_t offset ) const
|
||||
uint64_t View::GetFrameNumber( const FrameData& fd, int i ) const
|
||||
{
|
||||
if( fd.name == 0 )
|
||||
{
|
||||
const auto offset = m_worker.GetFrameOffset();
|
||||
if( offset == 0 )
|
||||
{
|
||||
return i;
|
||||
@ -770,7 +771,7 @@ 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 ) const
|
||||
{
|
||||
const auto fnum = GetFrameNumber( fd, i, m_worker.GetFrameOffset() );
|
||||
const auto fnum = GetFrameNumber( fd, i );
|
||||
static char buf[1024];
|
||||
if( fd.name == 0 )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user