mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add key to TimelineItem.
This commit is contained in:
parent
2df56e9941
commit
dbefb70db3
@ -8,10 +8,11 @@
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
TimelineItem::TimelineItem( View& view, Worker& worker )
|
||||
TimelineItem::TimelineItem( View& view, Worker& worker, const void* key )
|
||||
: m_visible( true )
|
||||
, m_showFull( true )
|
||||
, m_height( 0 )
|
||||
, m_key( key )
|
||||
, m_view( view )
|
||||
, m_worker( worker )
|
||||
{
|
||||
|
@ -14,7 +14,7 @@ class Worker;
|
||||
class TimelineItem
|
||||
{
|
||||
public:
|
||||
TimelineItem( View& view, Worker& worker );
|
||||
TimelineItem( View& view, Worker& worker, const void* key );
|
||||
virtual ~TimelineItem() = default;
|
||||
|
||||
// draws the timeilne item and also updates the next frame height value
|
||||
@ -29,6 +29,8 @@ public:
|
||||
// returns 0 instead of the correct value for the first frame
|
||||
int GetNextFrameHeight() const { return m_height; }
|
||||
|
||||
const void* GetKey() const { return m_key; }
|
||||
|
||||
protected:
|
||||
virtual uint32_t HeaderColor() const = 0;
|
||||
virtual uint32_t HeaderColorInactive() const = 0;
|
||||
@ -54,6 +56,8 @@ private:
|
||||
|
||||
int m_height;
|
||||
|
||||
const void* m_key;
|
||||
|
||||
protected:
|
||||
View& m_view;
|
||||
Worker& m_worker;
|
||||
|
@ -8,8 +8,8 @@
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
TimelineItemCpuData::TimelineItemCpuData( View& view, Worker& worker, void* )
|
||||
: TimelineItem( view, worker )
|
||||
TimelineItemCpuData::TimelineItemCpuData( View& view, Worker& worker, void* key )
|
||||
: TimelineItem( view, worker, key )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -10,7 +10,7 @@ namespace tracy
|
||||
class TimelineItemCpuData final : public TimelineItem
|
||||
{
|
||||
public:
|
||||
TimelineItemCpuData( View& view, Worker& worker, void* );
|
||||
TimelineItemCpuData( View& view, Worker& worker, void* key );
|
||||
|
||||
void SetVisible( bool visible ) override;
|
||||
bool IsVisible() const override;
|
||||
|
@ -10,7 +10,7 @@ namespace tracy
|
||||
{
|
||||
|
||||
TimelineItemGpu::TimelineItemGpu( View& view, Worker& worker, GpuCtxData* gpu )
|
||||
: TimelineItem( view, worker )
|
||||
: TimelineItem( view, worker, gpu )
|
||||
, m_gpu( gpu )
|
||||
, m_idx( view.GetNextGpuIdx() )
|
||||
{
|
||||
|
@ -9,7 +9,7 @@ namespace tracy
|
||||
{
|
||||
|
||||
TimelineItemPlot::TimelineItemPlot( View& view, Worker& worker, PlotData* plot )
|
||||
: TimelineItem( view, worker )
|
||||
: TimelineItem( view, worker, plot )
|
||||
, m_plot( plot )
|
||||
{
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ namespace tracy
|
||||
{
|
||||
|
||||
TimelineItemThread::TimelineItemThread( View& view, Worker& worker, const ThreadData* thread )
|
||||
: TimelineItem( view, worker )
|
||||
: TimelineItem( view, worker, thread )
|
||||
, m_thread( thread )
|
||||
, m_ghost( false )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user