mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Build messages draw list only if visible.
This commit is contained in:
parent
4b8ac41345
commit
a9ee4c499e
@ -324,8 +324,8 @@ void TimelineItemThread::Preprocess( const TimelineContext& ctx, TaskDispatch& t
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_hasMessages = false;
|
m_hasMessages = false;
|
||||||
td.Queue( [this, &ctx, visible] {
|
td.Queue( [this, &ctx, visible, yPos] {
|
||||||
PreprocessMessages( ctx, m_thread->messages, m_thread->id, visible );
|
PreprocessMessages( ctx, m_thread->messages, m_thread->id, visible, yPos );
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,7 +572,7 @@ void TimelineItemThread::PreprocessSamples( const TimelineContext& ctx, const Ve
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TimelineItemThread::PreprocessMessages( const TimelineContext& ctx, const Vector<short_ptr<MessageData>>& vec, uint64_t tid, bool visible )
|
void TimelineItemThread::PreprocessMessages( const TimelineContext& ctx, const Vector<short_ptr<MessageData>>& vec, uint64_t tid, bool visible, int yPos )
|
||||||
{
|
{
|
||||||
const auto vStart = ctx.vStart;
|
const auto vStart = ctx.vStart;
|
||||||
const auto vEnd = ctx.vEnd;
|
const auto vEnd = ctx.vEnd;
|
||||||
@ -587,6 +587,7 @@ void TimelineItemThread::PreprocessMessages( const TimelineContext& ctx, const V
|
|||||||
|
|
||||||
m_hasMessages = true;
|
m_hasMessages = true;
|
||||||
if( !visible ) return;
|
if( !visible ) return;
|
||||||
|
if( yPos > ctx.yMax || yPos + ctx.ty < ctx.yMin ) return;
|
||||||
|
|
||||||
const auto hMsg = m_view.GetMessageHighlight();
|
const auto hMsg = m_view.GetMessageHighlight();
|
||||||
const auto hThread = hMsg ? m_worker.DecompressThread( hMsg->thread ) : 0;
|
const auto hThread = hMsg ? m_worker.DecompressThread( hMsg->thread ) : 0;
|
||||||
|
@ -44,7 +44,7 @@ private:
|
|||||||
|
|
||||||
void PreprocessContextSwitches( const TimelineContext& ctx, const ContextSwitch& ctxSwitch, bool visible );
|
void PreprocessContextSwitches( const TimelineContext& ctx, const ContextSwitch& ctxSwitch, bool visible );
|
||||||
void PreprocessSamples( const TimelineContext& ctx, const Vector<SampleData>& vec, bool visible );
|
void PreprocessSamples( const TimelineContext& ctx, const Vector<SampleData>& vec, bool visible );
|
||||||
void PreprocessMessages( const TimelineContext& ctx, const Vector<short_ptr<MessageData>>& vec, uint64_t tid, bool visible );
|
void PreprocessMessages( const TimelineContext& ctx, const Vector<short_ptr<MessageData>>& vec, uint64_t tid, bool visible, int yPos );
|
||||||
|
|
||||||
const ThreadData* m_thread;
|
const ThreadData* m_thread;
|
||||||
bool m_ghost;
|
bool m_ghost;
|
||||||
|
Loading…
Reference in New Issue
Block a user