mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
New TimelineController begin/end logic.
This commit is contained in:
parent
8034fce416
commit
9355a14657
@ -20,8 +20,18 @@ void TimelineController::FirstFrameExpired()
|
||||
m_firstFrame = false;
|
||||
}
|
||||
|
||||
void TimelineController::End( float offset )
|
||||
void TimelineController::Begin()
|
||||
{
|
||||
m_items.clear();
|
||||
}
|
||||
|
||||
void TimelineController::End( double pxns, int offset, const ImVec2& wpos, bool hover, float yMin, float yMax )
|
||||
{
|
||||
for( auto& item : m_items )
|
||||
{
|
||||
item->Draw( m_firstFrame, pxns, offset, wpos, hover, yMin, yMax );
|
||||
}
|
||||
|
||||
const auto scrollPos = ImGui::GetScrollY();
|
||||
if( scrollPos == 0 && m_scroll != 0 )
|
||||
{
|
||||
|
@ -25,7 +25,8 @@ public:
|
||||
TimelineController( View& view, const Worker& worker );
|
||||
|
||||
void FirstFrameExpired();
|
||||
void End( float offset );
|
||||
void Begin();
|
||||
void End( double pxns, int offset, const ImVec2& wpos, bool hover, float yMin, float yMax );
|
||||
|
||||
template<class T, class U>
|
||||
void AddItem( U* data )
|
||||
|
@ -291,6 +291,7 @@ void View::DrawTimeline()
|
||||
}
|
||||
}
|
||||
|
||||
m_tc.Begin();
|
||||
DrawTimelineFramesHeader();
|
||||
auto& frames = m_worker.GetFrames();
|
||||
for( auto fd : frames )
|
||||
@ -1039,7 +1040,7 @@ void View::DrawTimeline()
|
||||
offset = DrawPlots( offset, pxns, wpos, hover, yMin, yMax );
|
||||
}
|
||||
|
||||
m_tc.End( offset );
|
||||
m_tc.End( pxns, offset, wpos, hover, yMin, yMax );
|
||||
ImGui::EndChild();
|
||||
|
||||
for( auto& ann : m_annotations )
|
||||
|
Loading…
Reference in New Issue
Block a user