mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Don't use space for frame sets that are out of view range.
This becomes problematic at the end of the range, as continuous frames do not have an "end", but rather essentially persist until the last recorded event.
This commit is contained in:
parent
f16c64872b
commit
5bd3f3de5f
@ -93,6 +93,10 @@ void View::DrawTimelineFramesHeader()
|
|||||||
|
|
||||||
void View::DrawTimelineFrames( const FrameData& frames )
|
void View::DrawTimelineFrames( const FrameData& frames )
|
||||||
{
|
{
|
||||||
|
const std::pair <int, int> zrange = m_worker.GetFrameRange( frames, m_vd.zvStart, m_vd.zvEnd );
|
||||||
|
if( zrange.first < 0 ) return;
|
||||||
|
if( m_worker.GetFrameBegin( frames, zrange.first ) > m_vd.zvEnd || m_worker.GetFrameEnd( frames, zrange.second ) < m_vd.zvStart ) return;
|
||||||
|
|
||||||
const auto wpos = ImGui::GetCursorScreenPos();
|
const auto wpos = ImGui::GetCursorScreenPos();
|
||||||
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
|
const auto dpos = wpos + ImVec2( 0.5f, 0.5f );
|
||||||
const auto w = ImGui::GetContentRegionAvail().x - ImGui::GetStyle().ScrollbarSize;
|
const auto w = ImGui::GetContentRegionAvail().x - ImGui::GetStyle().ScrollbarSize;
|
||||||
@ -110,9 +114,6 @@ void View::DrawTimelineFrames( const FrameData& frames )
|
|||||||
|
|
||||||
const auto nspx = 1.0 / pxns;
|
const auto nspx = 1.0 / pxns;
|
||||||
|
|
||||||
const std::pair <int, int> zrange = m_worker.GetFrameRange( frames, m_vd.zvStart, m_vd.zvEnd );
|
|
||||||
if( zrange.first < 0 ) return;
|
|
||||||
|
|
||||||
int64_t prev = -1;
|
int64_t prev = -1;
|
||||||
int64_t prevEnd = -1;
|
int64_t prevEnd = -1;
|
||||||
int64_t endPos = -1;
|
int64_t endPos = -1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user