1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Add key to TimelineItem.

This commit is contained in:
Tomaž Vöröš
2023-01-27 20:00:05 +01:00
parent 2df56e9941
commit dbefb70db3
7 changed files with 13 additions and 8 deletions
+5 -1
View File
@@ -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;