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

Push timline context to Draw and DrawContents functions.

This commit is contained in:
Bartosz Taudul
2023-03-14 02:24:23 +01:00
parent b6b6e1edcf
commit c81ef177ab
11 changed files with 21 additions and 20 deletions
+2 -2
View File
@@ -26,7 +26,7 @@ public:
virtual ~TimelineItem() = default;
// draws the timeline item and also updates the next frame height value
void Draw( bool firstFrame, double pxns, int yOffset, const ImVec2& wpos, bool hover, float yMin, float yMax );
void Draw( bool firstFrame, const TimelineContext& ctx, int yOffset, bool hover, float yMin, float yMax );
bool WantPreprocess() const { return m_wantPreprocess; }
virtual void Preprocess( const TimelineContext& ctx ) { assert( false ); }
@@ -54,7 +54,7 @@ protected:
virtual int64_t RangeBegin() const = 0;
virtual int64_t RangeEnd() const = 0;
virtual bool DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) = 0;
virtual bool DrawContents( const TimelineContext& ctx, int& offset, bool hover, float yMin, float yMax ) = 0;
virtual void DrawOverlay( const ImVec2& ul, const ImVec2& dr ) {}
virtual bool IsEmpty() const { return false; }