mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Inline GetZoneEndDirect().
This commit is contained in:
parent
910ce8b8ef
commit
69b49f527d
@ -299,7 +299,7 @@ std::pair <int, int> Worker::GetFrameRange( int64_t from, int64_t to )
|
||||
return std::make_pair( zbegin, zend );
|
||||
}
|
||||
|
||||
int64_t Worker::GetZoneEnd( const ZoneEvent& ev ) const
|
||||
int64_t Worker::GetZoneEnd( const ZoneEvent& ev )
|
||||
{
|
||||
auto ptr = &ev;
|
||||
for(;;)
|
||||
@ -310,7 +310,7 @@ int64_t Worker::GetZoneEnd( const ZoneEvent& ev ) const
|
||||
}
|
||||
}
|
||||
|
||||
int64_t Worker::GetZoneEnd( const GpuEvent& ev ) const
|
||||
int64_t Worker::GetZoneEnd( const GpuEvent& ev )
|
||||
{
|
||||
auto ptr = &ev;
|
||||
for(;;)
|
||||
@ -321,16 +321,6 @@ int64_t Worker::GetZoneEnd( const GpuEvent& ev ) const
|
||||
}
|
||||
}
|
||||
|
||||
int64_t Worker::GetZoneEndDirect( const ZoneEvent& ev ) const
|
||||
{
|
||||
return ev.end != -1 ? ev.end : ev.start;
|
||||
}
|
||||
|
||||
int64_t Worker::GetZoneEndDirect( const GpuEvent& ev ) const
|
||||
{
|
||||
return ev.gpuEnd != -1 ? ev.gpuEnd : ev.gpuStart;
|
||||
}
|
||||
|
||||
const char* Worker::GetString( uint64_t ptr ) const
|
||||
{
|
||||
const auto it = m_data.strings.find( ptr );
|
||||
|
||||
@ -114,10 +114,10 @@ public:
|
||||
// GetZoneEnd() will try to infer the end time by looking at child zones (parent zone can't end
|
||||
// before its children have ended).
|
||||
// GetZoneEndDirect() will only return zone's direct timing data, without looking at children.
|
||||
int64_t GetZoneEnd( const ZoneEvent& ev ) const;
|
||||
int64_t GetZoneEnd( const GpuEvent& ev ) const;
|
||||
int64_t GetZoneEndDirect( const ZoneEvent& ev ) const;
|
||||
int64_t GetZoneEndDirect( const GpuEvent& ev ) const;
|
||||
static int64_t GetZoneEnd( const ZoneEvent& ev );
|
||||
static int64_t GetZoneEnd( const GpuEvent& ev );
|
||||
static tracy_force_inline int64_t GetZoneEndDirect( const ZoneEvent& ev ) { return ev.end != -1 ? ev.end : ev.start; }
|
||||
static tracy_force_inline int64_t GetZoneEndDirect( const GpuEvent& ev ) { return ev.gpuEnd != -1 ? ev.gpuEnd : ev.gpuStart; }
|
||||
|
||||
const char* GetString( uint64_t ptr ) const;
|
||||
const char* GetString( const StringRef& ref ) const;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user