mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 10:41:50 +00:00
Fix one frame lag of out-of-trace dimming.
This commit is contained in:
parent
6c08943e66
commit
ac331d0343
@ -2916,18 +2916,6 @@ void View::DrawZones()
|
||||
const auto w = ImGui::GetWindowContentRegionWidth() - ImGui::GetStyle().ScrollbarSize;
|
||||
const auto timespan = m_vd.zvEnd - m_vd.zvStart;
|
||||
auto pxns = w / double( timespan );
|
||||
{
|
||||
const auto tbegin = 0;
|
||||
const auto tend = m_worker.GetLastTime();
|
||||
if( tbegin > m_vd.zvStart )
|
||||
{
|
||||
draw->AddRectFilled( linepos, linepos + ImVec2( ( tbegin - m_vd.zvStart ) * pxns, lineh ), 0x44000000 );
|
||||
}
|
||||
if( tend < m_vd.zvEnd )
|
||||
{
|
||||
draw->AddRectFilled( linepos + ImVec2( ( tend - m_vd.zvStart ) * pxns, 0 ), linepos + ImVec2( w, lineh ), 0x44000000 );
|
||||
}
|
||||
}
|
||||
|
||||
const auto winpos = ImGui::GetWindowPos();
|
||||
const auto winsize = ImGui::GetWindowSize();
|
||||
@ -2945,6 +2933,19 @@ void View::DrawZones()
|
||||
HandleZoneViewMouse( timespan, ImGui::GetCursorScreenPos(), w, pxns );
|
||||
}
|
||||
|
||||
{
|
||||
const auto tbegin = 0;
|
||||
const auto tend = m_worker.GetLastTime();
|
||||
if( tbegin > m_vd.zvStart )
|
||||
{
|
||||
draw->AddRectFilled( linepos, linepos + ImVec2( ( tbegin - m_vd.zvStart ) * pxns, lineh ), 0x44000000 );
|
||||
}
|
||||
if( tend < m_vd.zvEnd )
|
||||
{
|
||||
draw->AddRectFilled( linepos + ImVec2( ( tend - m_vd.zvStart ) * pxns, 0 ), linepos + ImVec2( w, lineh ), 0x44000000 );
|
||||
}
|
||||
}
|
||||
|
||||
DrawZoneFramesHeader();
|
||||
auto& frames = m_worker.GetFrames();
|
||||
for( auto fd : frames )
|
||||
|
Loading…
Reference in New Issue
Block a user