mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-27 00:04:35 +00:00
Don't miss frame separators.
This commit is contained in:
parent
81cf024498
commit
0d8b79f6c9
@ -1293,6 +1293,7 @@ bool View::DrawZoneFrames( const FrameData& frames )
|
|||||||
|
|
||||||
int64_t prev = -1;
|
int64_t prev = -1;
|
||||||
int64_t prevEnd = -1;
|
int64_t prevEnd = -1;
|
||||||
|
int64_t endPos = -1;
|
||||||
bool tooltipDisplayed = false;
|
bool tooltipDisplayed = false;
|
||||||
|
|
||||||
for( int i = zrange.first; i < zrange.second; i++ )
|
for( int i = zrange.first; i < zrange.second; i++ )
|
||||||
@ -1356,14 +1357,15 @@ bool View::DrawZoneFrames( const FrameData& frames )
|
|||||||
|
|
||||||
if( m_frames == &frames )
|
if( m_frames == &frames )
|
||||||
{
|
{
|
||||||
if( fbegin >= m_zvStart )
|
if( fbegin >= m_zvStart && endPos != fbegin )
|
||||||
{
|
{
|
||||||
draw->AddLine( wpos + ImVec2( ( fbegin - m_zvStart ) * pxns, 0 ), wpos + ImVec2( ( fbegin - m_zvStart ) * pxns, wh ), 0x22FFFFFF );
|
draw->AddLine( wpos + ImVec2( ( fbegin - m_zvStart ) * pxns, 0 ), wpos + ImVec2( ( fbegin - m_zvStart ) * pxns, wh ), 0x22FFFFFF );
|
||||||
}
|
}
|
||||||
if( !frames.continuous && fend <= m_zvEnd )
|
if( fend <= m_zvEnd )
|
||||||
{
|
{
|
||||||
draw->AddLine( wpos + ImVec2( ( fend - m_zvStart ) * pxns, 0 ), wpos + ImVec2( ( fend - m_zvStart ) * pxns, wh ), 0x22FFFFFF );
|
draw->AddLine( wpos + ImVec2( ( fend - m_zvStart ) * pxns, 0 ), wpos + ImVec2( ( fend - m_zvStart ) * pxns, wh ), 0x22FFFFFF );
|
||||||
}
|
}
|
||||||
|
endPos = fend;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto buf = GetFrameText( frames, i, ftime, m_worker.GetFrameOffset() );
|
auto buf = GetFrameText( frames, i, ftime, m_worker.GetFrameOffset() );
|
||||||
@ -1403,12 +1405,6 @@ bool View::DrawZoneFrames( const FrameData& frames )
|
|||||||
prev = -1;
|
prev = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto fend = m_worker.GetFrameEnd( frames, zrange.second-1 );
|
|
||||||
if( fend == m_zvEnd )
|
|
||||||
{
|
|
||||||
draw->AddLine( wpos + ImVec2( ( fend - m_zvStart ) * pxns, 0 ), wpos + ImVec2( ( fend - m_zvStart ) * pxns, wh ), 0x22FFFFFF );
|
|
||||||
}
|
|
||||||
|
|
||||||
if( hover && !tooltipDisplayed )
|
if( hover && !tooltipDisplayed )
|
||||||
{
|
{
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
|
Loading…
Reference in New Issue
Block a user