diff --git a/server/TracyTimelineContext.hpp b/server/TracyTimelineContext.hpp new file mode 100644 index 00000000..4878eb81 --- /dev/null +++ b/server/TracyTimelineContext.hpp @@ -0,0 +1,23 @@ +#ifndef __TRACYTIMELINECONTEXT_HPP__ +#define __TRACYTIMELINECONTEXT_HPP__ + +#include + +#include "imgui.h" + +namespace tracy +{ + +struct TimelineContext +{ + float w, ty, scale; + float yMin, yMax; + double pxns, nspx; + int64_t vStart, vEnd; + ImVec2 wpos; + bool hover; +}; + +} + +#endif diff --git a/server/TracyTimelineController.cpp b/server/TracyTimelineController.cpp index 3b2d184a..569f1b50 100644 --- a/server/TracyTimelineController.cpp +++ b/server/TracyTimelineController.cpp @@ -1,6 +1,7 @@ #include -#include "TracyImGui.hpp" +#include "TracyTimelineItem.hpp" +#include "TracyTimelineContext.hpp" #include "TracyTimelineController.hpp" #include "TracyView.hpp" @@ -18,6 +19,10 @@ TimelineController::TimelineController( View& view, Worker& worker ) { } +TimelineController::~TimelineController() +{ +} + void TimelineController::FirstFrameExpired() { m_firstFrame = false; diff --git a/server/TracyTimelineController.hpp b/server/TracyTimelineController.hpp index b14dca67..8d9ac007 100644 --- a/server/TracyTimelineController.hpp +++ b/server/TracyTimelineController.hpp @@ -5,17 +5,22 @@ #include #include +#include "TracyImGui.hpp" #include "../public/common/TracyForceInline.hpp" #include "tracy_robin_hood.h" -#include "TracyTimelineItem.hpp" namespace tracy { +class TimelineItem; +class View; +class Worker; + class TimelineController { public: TimelineController( View& view, Worker& worker ); + ~TimelineController(); void FirstFrameExpired(); void Begin(); diff --git a/server/TracyTimelineItem.cpp b/server/TracyTimelineItem.cpp index 533b05cd..d4b737e1 100644 --- a/server/TracyTimelineItem.cpp +++ b/server/TracyTimelineItem.cpp @@ -2,6 +2,7 @@ #include "TracyImGui.hpp" #include "TracyMouse.hpp" +#include "TracyTimelineContext.hpp" #include "TracyTimelineItem.hpp" #include "TracyView.hpp" diff --git a/server/TracyTimelineItem.hpp b/server/TracyTimelineItem.hpp index a484593e..c6f9b6e7 100644 --- a/server/TracyTimelineItem.hpp +++ b/server/TracyTimelineItem.hpp @@ -9,19 +9,10 @@ namespace tracy { +struct TimelineContext; class View; class Worker; -struct TimelineContext -{ - float w, ty, scale; - float yMin, yMax; - double pxns, nspx; - int64_t vStart, vEnd; - ImVec2 wpos; - bool hover; -}; - class TimelineItem { public: diff --git a/server/TracyTimelineItemCpuData.cpp b/server/TracyTimelineItemCpuData.cpp index da4f85b8..73908c73 100644 --- a/server/TracyTimelineItemCpuData.cpp +++ b/server/TracyTimelineItemCpuData.cpp @@ -1,5 +1,6 @@ #include "TracyImGui.hpp" #include "TracyPrint.hpp" +#include "TracyTimelineContext.hpp" #include "TracyTimelineItemCpuData.hpp" #include "TracyUtility.hpp" #include "TracyView.hpp" diff --git a/server/TracyTimelineItemGpu.cpp b/server/TracyTimelineItemGpu.cpp index 33d7b9a5..5242e237 100644 --- a/server/TracyTimelineItemGpu.cpp +++ b/server/TracyTimelineItemGpu.cpp @@ -1,6 +1,7 @@ #include "TracyImGui.hpp" #include "TracyPopcnt.hpp" #include "TracyPrint.hpp" +#include "TracyTimelineContext.hpp" #include "TracyTimelineItemGpu.hpp" #include "TracyUtility.hpp" #include "TracyView.hpp" diff --git a/server/TracyTimelineItemPlot.cpp b/server/TracyTimelineItemPlot.cpp index 673f778e..0b0b9e24 100644 --- a/server/TracyTimelineItemPlot.cpp +++ b/server/TracyTimelineItemPlot.cpp @@ -1,5 +1,6 @@ #include "TracyImGui.hpp" #include "TracyPrint.hpp" +#include "TracyTimelineContext.hpp" #include "TracyTimelineItemPlot.hpp" #include "TracyUtility.hpp" #include "TracyView.hpp" diff --git a/server/TracyTimelineItemThread.cpp b/server/TracyTimelineItemThread.cpp index 6e8e2b9e..6d8f696c 100644 --- a/server/TracyTimelineItemThread.cpp +++ b/server/TracyTimelineItemThread.cpp @@ -4,6 +4,7 @@ #include "TracyImGui.hpp" #include "TracyMouse.hpp" #include "TracyPrint.hpp" +#include "TracyTimelineContext.hpp" #include "TracyTimelineItemThread.hpp" #include "TracyView.hpp" #include "TracyWorker.hpp" diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 5eb94374..92585a0e 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -40,6 +40,7 @@ constexpr const char* GpuContextNames[] = { struct MemoryPage; class FileRead; class SourceView; +struct TimelineContext; class View { diff --git a/server/TracyView_CpuData.cpp b/server/TracyView_CpuData.cpp index e1064e67..fa82a248 100644 --- a/server/TracyView_CpuData.cpp +++ b/server/TracyView_CpuData.cpp @@ -4,6 +4,7 @@ #include "TracyImGui.hpp" #include "TracyMouse.hpp" #include "TracyPrint.hpp" +#include "TracyTimelineItem.hpp" #include "TracyView.hpp" namespace tracy diff --git a/server/TracyView_NotificationArea.cpp b/server/TracyView_NotificationArea.cpp index c776fbe3..72726554 100644 --- a/server/TracyView_NotificationArea.cpp +++ b/server/TracyView_NotificationArea.cpp @@ -1,6 +1,7 @@ #include "TracyImGui.hpp" #include "TracyMouse.hpp" #include "TracyPrint.hpp" +#include "TracyTimelineItem.hpp" #include "TracyView.hpp" namespace tracy diff --git a/server/TracyView_ZoneTimeline.cpp b/server/TracyView_ZoneTimeline.cpp index 87b1ab89..ac2cc0e2 100644 --- a/server/TracyView_ZoneTimeline.cpp +++ b/server/TracyView_ZoneTimeline.cpp @@ -4,6 +4,7 @@ #include "TracyImGui.hpp" #include "TracyMouse.hpp" #include "TracyPrint.hpp" +#include "TracyTimelineItem.hpp" #include "TracyView.hpp" namespace tracy