Move TimelineContext struct definition to a separate header.

This commit is contained in:
Bartosz Taudul 2023-03-18 17:03:23 +01:00
parent 5b3427395e
commit 0ecdcbc13c
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
13 changed files with 45 additions and 12 deletions

View File

@ -0,0 +1,23 @@
#ifndef __TRACYTIMELINECONTEXT_HPP__
#define __TRACYTIMELINECONTEXT_HPP__
#include <stdint.h>
#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

View File

@ -1,6 +1,7 @@
#include <algorithm> #include <algorithm>
#include "TracyImGui.hpp" #include "TracyTimelineItem.hpp"
#include "TracyTimelineContext.hpp"
#include "TracyTimelineController.hpp" #include "TracyTimelineController.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"
@ -18,6 +19,10 @@ TimelineController::TimelineController( View& view, Worker& worker )
{ {
} }
TimelineController::~TimelineController()
{
}
void TimelineController::FirstFrameExpired() void TimelineController::FirstFrameExpired()
{ {
m_firstFrame = false; m_firstFrame = false;

View File

@ -5,17 +5,22 @@
#include <optional> #include <optional>
#include <vector> #include <vector>
#include "TracyImGui.hpp"
#include "../public/common/TracyForceInline.hpp" #include "../public/common/TracyForceInline.hpp"
#include "tracy_robin_hood.h" #include "tracy_robin_hood.h"
#include "TracyTimelineItem.hpp"
namespace tracy namespace tracy
{ {
class TimelineItem;
class View;
class Worker;
class TimelineController class TimelineController
{ {
public: public:
TimelineController( View& view, Worker& worker ); TimelineController( View& view, Worker& worker );
~TimelineController();
void FirstFrameExpired(); void FirstFrameExpired();
void Begin(); void Begin();

View File

@ -2,6 +2,7 @@
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
#include "TracyMouse.hpp" #include "TracyMouse.hpp"
#include "TracyTimelineContext.hpp"
#include "TracyTimelineItem.hpp" #include "TracyTimelineItem.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"

View File

@ -9,19 +9,10 @@
namespace tracy namespace tracy
{ {
struct TimelineContext;
class View; class View;
class Worker; class Worker;
struct TimelineContext
{
float w, ty, scale;
float yMin, yMax;
double pxns, nspx;
int64_t vStart, vEnd;
ImVec2 wpos;
bool hover;
};
class TimelineItem class TimelineItem
{ {
public: public:

View File

@ -1,5 +1,6 @@
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracyTimelineContext.hpp"
#include "TracyTimelineItemCpuData.hpp" #include "TracyTimelineItemCpuData.hpp"
#include "TracyUtility.hpp" #include "TracyUtility.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"

View File

@ -1,6 +1,7 @@
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
#include "TracyPopcnt.hpp" #include "TracyPopcnt.hpp"
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracyTimelineContext.hpp"
#include "TracyTimelineItemGpu.hpp" #include "TracyTimelineItemGpu.hpp"
#include "TracyUtility.hpp" #include "TracyUtility.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"

View File

@ -1,5 +1,6 @@
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracyTimelineContext.hpp"
#include "TracyTimelineItemPlot.hpp" #include "TracyTimelineItemPlot.hpp"
#include "TracyUtility.hpp" #include "TracyUtility.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"

View File

@ -4,6 +4,7 @@
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
#include "TracyMouse.hpp" #include "TracyMouse.hpp"
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracyTimelineContext.hpp"
#include "TracyTimelineItemThread.hpp" #include "TracyTimelineItemThread.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"
#include "TracyWorker.hpp" #include "TracyWorker.hpp"

View File

@ -40,6 +40,7 @@ constexpr const char* GpuContextNames[] = {
struct MemoryPage; struct MemoryPage;
class FileRead; class FileRead;
class SourceView; class SourceView;
struct TimelineContext;
class View class View
{ {

View File

@ -4,6 +4,7 @@
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
#include "TracyMouse.hpp" #include "TracyMouse.hpp"
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracyTimelineItem.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"
namespace tracy namespace tracy

View File

@ -1,6 +1,7 @@
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
#include "TracyMouse.hpp" #include "TracyMouse.hpp"
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracyTimelineItem.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"
namespace tracy namespace tracy

View File

@ -4,6 +4,7 @@
#include "TracyImGui.hpp" #include "TracyImGui.hpp"
#include "TracyMouse.hpp" #include "TracyMouse.hpp"
#include "TracyPrint.hpp" #include "TracyPrint.hpp"
#include "TracyTimelineItem.hpp"
#include "TracyView.hpp" #include "TracyView.hpp"
namespace tracy namespace tracy