mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 20:33:52 +00:00
Configure number of threads in TimelineController.
This commit is contained in:
parent
a2d470690f
commit
331c2bd7c0
@ -9,7 +9,7 @@
|
|||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
TimelineController::TimelineController( View& view, Worker& worker )
|
TimelineController::TimelineController( View& view, Worker& worker, bool threading )
|
||||||
: m_height( 0 )
|
: m_height( 0 )
|
||||||
, m_scroll( 0 )
|
, m_scroll( 0 )
|
||||||
, m_centerItemkey( nullptr )
|
, m_centerItemkey( nullptr )
|
||||||
@ -20,7 +20,7 @@ TimelineController::TimelineController( View& view, Worker& worker )
|
|||||||
#ifdef __EMSCRIPTEN__
|
#ifdef __EMSCRIPTEN__
|
||||||
, m_td( 1 )
|
, m_td( 1 )
|
||||||
#else
|
#else
|
||||||
, m_td( std::max( 1u, std::thread::hardware_concurrency() - 2 ), "Render" )
|
, m_td( threading ? std::max( 1u, std::thread::hardware_concurrency() - 2 ) : 1, "Render" )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -20,7 +20,7 @@ class Worker;
|
|||||||
class TimelineController
|
class TimelineController
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TimelineController( View& view, Worker& worker );
|
TimelineController( View& view, Worker& worker, bool threading );
|
||||||
~TimelineController();
|
~TimelineController();
|
||||||
|
|
||||||
void FirstFrameExpired();
|
void FirstFrameExpired();
|
||||||
|
@ -50,7 +50,7 @@ View::View( void(*cbMainThread)(const std::function<void()>&, bool), const char*
|
|||||||
, 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_tc( *this, m_worker, config.threadedRendering )
|
||||||
, m_frames( nullptr )
|
, m_frames( nullptr )
|
||||||
, m_messagesScrollBottom( true )
|
, m_messagesScrollBottom( true )
|
||||||
, m_reactToCrash( true )
|
, m_reactToCrash( true )
|
||||||
@ -73,7 +73,7 @@ View::View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f
|
|||||||
, 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_tc( *this, m_worker, config.threadedRendering )
|
||||||
, 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