mirror of
https://github.com/wolfpld/tracy
synced 2025-05-01 13:13:53 +00:00
Push yPos to TimelineItem::Preprocess().
This commit is contained in:
parent
77402eb9c2
commit
9500add83b
@ -143,7 +143,7 @@ void TimelineController::End( double pxns, const ImVec2& wpos, bool hover, bool
|
|||||||
{
|
{
|
||||||
const auto yPos = wpos.y + yOffset;
|
const auto yPos = wpos.y + yOffset;
|
||||||
const bool visible = m_firstFrame || ( yPos < yMax && yPos + item->GetHeight() >= yMin );
|
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();
|
yOffset += m_firstFrame ? 0 : item->GetHeight();
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@ public:
|
|||||||
void Draw( bool firstFrame, const TimelineContext& ctx, int yOffset );
|
void Draw( bool firstFrame, const TimelineContext& ctx, int yOffset );
|
||||||
|
|
||||||
bool WantPreprocess() const { return m_wantPreprocess; }
|
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();
|
void VisibilityCheckbox();
|
||||||
virtual void SetVisible( bool visible ) { m_visible = visible; }
|
virtual void SetVisible( bool visible ) { m_visible = visible; }
|
||||||
|
@ -51,7 +51,7 @@ void TimelineItemCpuData::DrawFinished()
|
|||||||
for( auto& v : m_ctxDraw ) v.clear();
|
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() );
|
assert( m_cpuDraw.empty() );
|
||||||
for( auto& v : m_ctxDraw ) assert( v.empty() );
|
for( auto& v : m_ctxDraw ) assert( v.empty() );
|
||||||
|
@ -30,7 +30,7 @@ protected:
|
|||||||
|
|
||||||
bool IsEmpty() const override;
|
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:
|
private:
|
||||||
void PreprocessCpuUsage( const TimelineContext& ctx );
|
void PreprocessCpuUsage( const TimelineContext& ctx );
|
||||||
|
@ -281,7 +281,7 @@ void TimelineItemThread::DrawFinished()
|
|||||||
m_msgDraw.clear();
|
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_samplesDraw.empty() );
|
||||||
assert( m_ctxDraw.empty() );
|
assert( m_ctxDraw.empty() );
|
||||||
|
@ -31,7 +31,7 @@ protected:
|
|||||||
|
|
||||||
bool IsEmpty() const override;
|
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:
|
private:
|
||||||
#ifndef TRACY_NO_STATISTICS
|
#ifndef TRACY_NO_STATISTICS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user