mirror of
https://github.com/wolfpld/tracy
synced 2025-04-29 12:23:53 +00:00
Configure number of threads in TimelineController.
This commit is contained in:
parent
a2d470690f
commit
331c2bd7c0
@ -9,7 +9,7 @@
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
TimelineController::TimelineController( View& view, Worker& worker )
|
||||
TimelineController::TimelineController( View& view, Worker& worker, bool threading )
|
||||
: m_height( 0 )
|
||||
, m_scroll( 0 )
|
||||
, m_centerItemkey( nullptr )
|
||||
@ -20,7 +20,7 @@ TimelineController::TimelineController( View& view, Worker& worker )
|
||||
#ifdef __EMSCRIPTEN__
|
||||
, m_td( 1 )
|
||||
#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
|
||||
{
|
||||
}
|
||||
|
@ -20,7 +20,7 @@ class Worker;
|
||||
class TimelineController
|
||||
{
|
||||
public:
|
||||
TimelineController( View& view, Worker& worker );
|
||||
TimelineController( View& view, Worker& worker, bool threading );
|
||||
~TimelineController();
|
||||
|
||||
void FirstFrameExpired();
|
||||
|
@ -50,7 +50,7 @@ View::View( void(*cbMainThread)(const std::function<void()>&, bool), const char*
|
||||
, m_viewMode( ViewMode::LastFrames )
|
||||
, m_viewModeHeuristicTry( true )
|
||||
, m_forceConnectionPopup( true, true )
|
||||
, m_tc( *this, m_worker )
|
||||
, m_tc( *this, m_worker, config.threadedRendering )
|
||||
, m_frames( nullptr )
|
||||
, m_messagesScrollBottom( true )
|
||||
, m_reactToCrash( true )
|
||||
@ -73,7 +73,7 @@ View::View( void(*cbMainThread)(const std::function<void()>&, bool), FileRead& f
|
||||
, m_filename( f.GetFilename() )
|
||||
, m_staticView( true )
|
||||
, m_viewMode( ViewMode::Paused )
|
||||
, m_tc( *this, m_worker )
|
||||
, m_tc( *this, m_worker, config.threadedRendering )
|
||||
, m_frames( m_worker.GetFramesBase() )
|
||||
, m_messagesScrollBottom( false )
|
||||
, m_smallFont( smallFont )
|
||||
|
Loading…
x
Reference in New Issue
Block a user