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 "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;

View File

@ -5,17 +5,22 @@
#include <optional>
#include <vector>
#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();

View File

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

View File

@ -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:

View File

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

View File

@ -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"

View File

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

View File

@ -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"

View File

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

View File

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

View File

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

View File

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