mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
TimelineItemThread can now determine visibility internally.
This commit is contained in:
parent
a141aafaab
commit
e321e91c7d
@ -259,8 +259,8 @@ void TimelineItemThread::HeaderExtraContents( const TimelineContext& ctx, int of
|
|||||||
|
|
||||||
bool TimelineItemThread::DrawContents( const TimelineContext& ctx, int& offset )
|
bool TimelineItemThread::DrawContents( const TimelineContext& ctx, int& offset )
|
||||||
{
|
{
|
||||||
const auto res = m_view.DrawThread( ctx, *m_thread, m_draw, m_ctxDraw, m_samplesDraw, offset, m_depth );
|
m_view.DrawThread( ctx, *m_thread, m_draw, m_ctxDraw, m_samplesDraw, offset, m_depth );
|
||||||
if( !res )
|
if( m_depth == 0 && m_msgDraw.empty() )
|
||||||
{
|
{
|
||||||
auto& crash = m_worker.GetCrashEvent();
|
auto& crash = m_worker.GetCrashEvent();
|
||||||
return crash.thread == m_thread->id;
|
return crash.thread == m_thread->id;
|
||||||
|
@ -126,7 +126,7 @@ public:
|
|||||||
void HighlightThread( uint64_t thread );
|
void HighlightThread( uint64_t thread );
|
||||||
void ZoomToRange( int64_t start, int64_t end, bool pause = true );
|
void ZoomToRange( int64_t start, int64_t end, bool pause = true );
|
||||||
bool DrawPlot( const TimelineContext& ctx, PlotData& plot, int& offset );
|
bool DrawPlot( const TimelineContext& ctx, PlotData& plot, int& offset );
|
||||||
bool DrawThread( const TimelineContext& ctx, const ThreadData& thread, const std::vector<TimelineDraw>& draw, const std::vector<ContextSwitchDraw>& ctxDraw, const std::vector<SamplesDraw>& samplesDraw, int& offset, int depth );
|
void DrawThread( const TimelineContext& ctx, const ThreadData& thread, const std::vector<TimelineDraw>& draw, const std::vector<ContextSwitchDraw>& ctxDraw, const std::vector<SamplesDraw>& samplesDraw, int& offset, int depth );
|
||||||
void DrawThreadMessages( const TimelineContext& ctx, const ThreadData& thread, int offset );
|
void DrawThreadMessages( const TimelineContext& ctx, const ThreadData& thread, int offset );
|
||||||
void DrawThreadOverlays( const ThreadData& thread, const ImVec2& ul, const ImVec2& dr );
|
void DrawThreadOverlays( const ThreadData& thread, const ImVec2& ul, const ImVec2& dr );
|
||||||
bool DrawGpu( const TimelineContext& ctx, const GpuCtxData& gpu, int& offset );
|
bool DrawGpu( const TimelineContext& ctx, const GpuCtxData& gpu, int& offset );
|
||||||
|
@ -23,7 +23,7 @@ static tracy_force_inline uint32_t MixGhostColor( uint32_t c0, uint32_t c1 )
|
|||||||
( ( ( ( ( c0 & 0x000000FF ) ) + 3 * ( ( c1 & 0x000000FF ) ) ) >> 2 ) );
|
( ( ( ( ( c0 & 0x000000FF ) ) + 3 * ( ( c1 & 0x000000FF ) ) ) >> 2 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool View::DrawThread( const TimelineContext& ctx, const ThreadData& thread, const std::vector<TimelineDraw>& draw, const std::vector<ContextSwitchDraw>& ctxDraw, const std::vector<SamplesDraw>& samplesDraw, int& offset, int depth )
|
void View::DrawThread( const TimelineContext& ctx, const ThreadData& thread, const std::vector<TimelineDraw>& draw, const std::vector<ContextSwitchDraw>& ctxDraw, const std::vector<SamplesDraw>& samplesDraw, int& offset, int depth )
|
||||||
{
|
{
|
||||||
const auto& wpos = ctx.wpos;
|
const auto& wpos = ctx.wpos;
|
||||||
const auto ty = ctx.ty;
|
const auto ty = ctx.ty;
|
||||||
@ -82,14 +82,6 @@ bool View::DrawThread( const TimelineContext& ctx, const ThreadData& thread, con
|
|||||||
offset += sstep * lockDepth;
|
offset += sstep * lockDepth;
|
||||||
depth += lockDepth;
|
depth += lockDepth;
|
||||||
}
|
}
|
||||||
|
|
||||||
if( depth == 0 )
|
|
||||||
{
|
|
||||||
auto msgit = std::lower_bound( thread.messages.begin(), thread.messages.end(), m_vd.zvStart, [] ( const auto& lhs, const auto& rhs ) { return lhs->time < rhs; } );
|
|
||||||
auto msgend = std::lower_bound( msgit, thread.messages.end(), m_vd.zvEnd+1, [] ( const auto& lhs, const auto& rhs ) { return lhs->time < rhs; } );
|
|
||||||
return msgit != msgend;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void View::DrawThreadMessages( const TimelineContext& ctx, const ThreadData& thread, int offset )
|
void View::DrawThreadMessages( const TimelineContext& ctx, const ThreadData& thread, int offset )
|
||||||
|
Loading…
Reference in New Issue
Block a user