mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add frame image accessor.
This commit is contained in:
parent
34b84bb284
commit
af56f41e32
@ -1400,6 +1400,14 @@ int64_t Worker::GetFrameEnd( const FrameData& fd, size_t idx ) const
|
||||
}
|
||||
}
|
||||
|
||||
const FrameImage* Worker::GetFrameImage( const FrameData& fd, size_t idx ) const
|
||||
{
|
||||
assert( idx < fd.frames.size() );
|
||||
const auto& v = fd.frames[idx].frameImage;
|
||||
if( v < 0 ) return nullptr;
|
||||
return m_data.frameImage[v];
|
||||
}
|
||||
|
||||
std::pair <int, int> Worker::GetFrameRange( const FrameData& fd, int64_t from, int64_t to )
|
||||
{
|
||||
auto zitbegin = std::lower_bound( fd.frames.begin(), fd.frames.end(), from, [] ( const auto& lhs, const auto& rhs ) { return lhs.start < rhs; } );
|
||||
|
@ -263,6 +263,7 @@ public:
|
||||
int64_t GetFrameTime( const FrameData& fd, size_t idx ) const;
|
||||
int64_t GetFrameBegin( const FrameData& fd, size_t idx ) const;
|
||||
int64_t GetFrameEnd( const FrameData& fd, size_t idx ) const;
|
||||
const FrameImage* GetFrameImage( const FrameData& fd, size_t idx ) const;
|
||||
std::pair <int, int> GetFrameRange( const FrameData& fd, int64_t from, int64_t to );
|
||||
|
||||
const flat_hash_map<uint32_t, LockMap*, nohash<uint32_t>>& GetLockMap() const { return m_data.lockMap; }
|
||||
|
Loading…
Reference in New Issue
Block a user