mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Store View and Worker in TimelineController.
This commit is contained in:
parent
b42182f0a8
commit
449dff0eca
@ -5,11 +5,13 @@
|
|||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
TimelineController::TimelineController()
|
TimelineController::TimelineController( View& view, const Worker& worker )
|
||||||
: m_height( 0 )
|
: m_height( 0 )
|
||||||
, m_offset( 0 )
|
, m_offset( 0 )
|
||||||
, m_scroll( 0 )
|
, m_scroll( 0 )
|
||||||
, m_firstFrame( true )
|
, m_firstFrame( true )
|
||||||
|
, m_view( view )
|
||||||
|
, m_worker( worker )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -19,7 +19,7 @@ class TimelineController
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TimelineController();
|
TimelineController( View& view, const Worker& worker );
|
||||||
|
|
||||||
void FirstFrameExpired();
|
void FirstFrameExpired();
|
||||||
void End( float offset );
|
void End( float offset );
|
||||||
@ -48,6 +48,9 @@ private:
|
|||||||
float m_scroll;
|
float m_scroll;
|
||||||
|
|
||||||
bool m_firstFrame;
|
bool m_firstFrame;
|
||||||
|
|
||||||
|
View& m_view;
|
||||||
|
const Worker& m_worker;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -52,6 +52,7 @@ View::View( void(*cbMainThread)(std::function<void()>, bool), const char* addr,
|
|||||||
, m_viewMode( ViewMode::LastFrames )
|
, m_viewMode( ViewMode::LastFrames )
|
||||||
, m_viewModeHeuristicTry( true )
|
, m_viewModeHeuristicTry( true )
|
||||||
, m_forceConnectionPopup( true, true )
|
, m_forceConnectionPopup( true, true )
|
||||||
|
, m_tc( *this, m_worker )
|
||||||
, m_frames( nullptr )
|
, m_frames( nullptr )
|
||||||
, m_messagesScrollBottom( true )
|
, m_messagesScrollBottom( true )
|
||||||
, m_reactToCrash( true )
|
, m_reactToCrash( true )
|
||||||
@ -76,6 +77,7 @@ View::View( void(*cbMainThread)(std::function<void()>, bool), FileRead& f, ImFon
|
|||||||
, m_filename( f.GetFilename() )
|
, m_filename( f.GetFilename() )
|
||||||
, m_staticView( true )
|
, m_staticView( true )
|
||||||
, m_viewMode( ViewMode::Paused )
|
, m_viewMode( ViewMode::Paused )
|
||||||
|
, m_tc( *this, m_worker )
|
||||||
, m_frames( m_worker.GetFramesBase() )
|
, m_frames( m_worker.GetFramesBase() )
|
||||||
, m_messagesScrollBottom( false )
|
, m_messagesScrollBottom( false )
|
||||||
, m_smallFont( smallFont )
|
, m_smallFont( smallFont )
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user