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:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user