mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 16:04:34 +00:00
Worker must be mutable.
This is to allow use of various accessors that cache results, etc.
This commit is contained in:
parent
b481bb367c
commit
119152aac1
@ -5,7 +5,7 @@
|
|||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
TimelineController::TimelineController( View& view, const Worker& worker )
|
TimelineController::TimelineController( View& view, Worker& worker )
|
||||||
: m_height( 0 )
|
: m_height( 0 )
|
||||||
, m_offset( 0 )
|
, m_offset( 0 )
|
||||||
, m_scroll( 0 )
|
, m_scroll( 0 )
|
||||||
|
@ -23,7 +23,7 @@ class TimelineController
|
|||||||
};
|
};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TimelineController( View& view, const Worker& worker );
|
TimelineController( View& view, Worker& worker );
|
||||||
|
|
||||||
void FirstFrameExpired();
|
void FirstFrameExpired();
|
||||||
void Begin();
|
void Begin();
|
||||||
@ -73,7 +73,7 @@ private:
|
|||||||
bool m_firstFrame;
|
bool m_firstFrame;
|
||||||
|
|
||||||
View& m_view;
|
View& m_view;
|
||||||
const Worker& m_worker;
|
Worker& m_worker;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
TimelineItem::TimelineItem( View& view, const Worker& worker )
|
TimelineItem::TimelineItem( View& view, Worker& worker )
|
||||||
: m_visible( true )
|
: m_visible( true )
|
||||||
, m_showFull( true )
|
, m_showFull( true )
|
||||||
, m_height( 0 )
|
, m_height( 0 )
|
||||||
|
@ -14,7 +14,7 @@ class Worker;
|
|||||||
class TimelineItem
|
class TimelineItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TimelineItem( View& view, const Worker& worker );
|
TimelineItem( View& view, Worker& worker );
|
||||||
virtual ~TimelineItem() = default;
|
virtual ~TimelineItem() = default;
|
||||||
|
|
||||||
void Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax );
|
void Draw( bool firstFrame, double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax );
|
||||||
@ -47,7 +47,7 @@ private:
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
View& m_view;
|
View& m_view;
|
||||||
const Worker& m_worker;
|
Worker& m_worker;
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
namespace tracy
|
namespace tracy
|
||||||
{
|
{
|
||||||
|
|
||||||
TimelineItemPlot::TimelineItemPlot( View& view, const Worker& worker, PlotData* plot )
|
TimelineItemPlot::TimelineItemPlot( View& view, Worker& worker, PlotData* plot )
|
||||||
: TimelineItem( view, worker )
|
: TimelineItem( view, worker )
|
||||||
, m_plot( plot )
|
, m_plot( plot )
|
||||||
{
|
{
|
||||||
|
@ -10,7 +10,7 @@ namespace tracy
|
|||||||
class TimelineItemPlot final : public TimelineItem
|
class TimelineItemPlot final : public TimelineItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TimelineItemPlot( View& view, const Worker& worker, PlotData* plot );
|
TimelineItemPlot( View& view, Worker& worker, PlotData* plot );
|
||||||
|
|
||||||
void DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) override;
|
void DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user