1
0
mirror of https://github.com/wolfpld/tracy synced 2025-04-29 04:23:51 +00:00

Push yPos to TimelineItem::Preprocess().

This commit is contained in:
Bartosz Taudul 2023-04-05 18:07:09 +02:00
parent 77402eb9c2
commit 9500add83b
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
6 changed files with 6 additions and 6 deletions

View File

@ -143,7 +143,7 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool
{
const auto yPos = wpos.y + yOffset;
const bool visible = m_firstFrame || ( yPos < yMax && yPos + item->GetHeight() >= yMin );
item->Preprocess( ctx, m_td, visible );
item->Preprocess( ctx, m_td, visible, yPos );
}
yOffset += m_firstFrame ? 0 : item->GetHeight();
}

View File

@ -24,7 +24,7 @@ public:
void Draw( bool firstFrame, const TimelineContext& ctx, int yOffset );
bool WantPreprocess() const { return m_wantPreprocess; }
virtual void Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible ) { assert( false ); }
virtual void Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible, int yPos ) { assert( false ); }
void VisibilityCheckbox();
virtual void SetVisible( bool visible ) { m_visible = visible; }

View File

@ -51,7 +51,7 @@ void TimelineItemCpuData::DrawFinished()
for( auto& v : m_ctxDraw ) v.clear();
}
void TimelineItemCpuData::Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible )
void TimelineItemCpuData::Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible, int yPos )
{
assert( m_cpuDraw.empty() );
for( auto& v : m_ctxDraw ) assert( v.empty() );

View File

@ -30,7 +30,7 @@ protected:
bool IsEmpty() const override;
void Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible ) override;
void Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible, int yPos ) override;
private:
void PreprocessCpuUsage( const TimelineContext& ctx );

View File

@ -281,7 +281,7 @@ void TimelineItemThread::DrawFinished()
m_msgDraw.clear();
}
void TimelineItemThread::Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible )
void TimelineItemThread::Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible, int yPos )
{
assert( m_samplesDraw.empty() );
assert( m_ctxDraw.empty() );

View File

@ -31,7 +31,7 @@ protected:
bool IsEmpty() const override;
void Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible ) override;
void Preprocess( const TimelineContext& ctx, TaskDispatch& td, bool visible, int yPos ) override;
private:
#ifndef TRACY_NO_STATISTICS