diff --git a/server/TracyTimelineController.cpp b/server/TracyTimelineController.cpp index 1a32845e..f6686798 100644 --- a/server/TracyTimelineController.cpp +++ b/server/TracyTimelineController.cpp @@ -5,11 +5,13 @@ namespace tracy { -TimelineController::TimelineController() +TimelineController::TimelineController( View& view, const Worker& worker ) : m_height( 0 ) , m_offset( 0 ) , m_scroll( 0 ) , m_firstFrame( true ) + , m_view( view ) + , m_worker( worker ) { } diff --git a/server/TracyTimelineController.hpp b/server/TracyTimelineController.hpp index eccb8edd..8298d5d4 100644 --- a/server/TracyTimelineController.hpp +++ b/server/TracyTimelineController.hpp @@ -19,7 +19,7 @@ class TimelineController }; public: - TimelineController(); + TimelineController( View& view, const Worker& worker ); void FirstFrameExpired(); void End( float offset ); @@ -48,6 +48,9 @@ private: float m_scroll; bool m_firstFrame; + + View& m_view; + const Worker& m_worker; }; } diff --git a/server/TracyView.cpp b/server/TracyView.cpp index e069872c..3e66d11c 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -52,6 +52,7 @@ View::View( void(*cbMainThread)(std::function, bool), const char* addr, , m_viewMode( ViewMode::LastFrames ) , m_viewModeHeuristicTry( true ) , m_forceConnectionPopup( true, true ) + , m_tc( *this, m_worker ) , m_frames( nullptr ) , m_messagesScrollBottom( true ) , m_reactToCrash( true ) @@ -76,6 +77,7 @@ View::View( void(*cbMainThread)(std::function, bool), FileRead& f, ImFon , m_filename( f.GetFilename() ) , m_staticView( true ) , m_viewMode( ViewMode::Paused ) + , m_tc( *this, m_worker ) , m_frames( m_worker.GetFramesBase() ) , m_messagesScrollBottom( false ) , m_smallFont( smallFont )