1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Timeline items may have preprocessing.

This commit is contained in:
Bartosz Taudul
2023-03-14 02:02:21 +01:00
parent 988de5b594
commit 7dd31ab609
6 changed files with 12 additions and 6 deletions
+6 -1
View File
@@ -1,6 +1,7 @@
#ifndef __TRACYTIMELINEITEM_HPP__
#define __TRACYTIMELINEITEM_HPP__
#include <assert.h>
#include <stdint.h>
#include "imgui.h"
@@ -14,12 +15,15 @@ class Worker;
class TimelineItem
{
public:
TimelineItem( View& view, Worker& worker, const void* key );
TimelineItem( View& view, Worker& worker, const void* key, bool wantPreprocess );
virtual ~TimelineItem() = default;
// draws the timeline item and also updates the next frame height value
void Draw( bool firstFrame, double pxns, int yOffset, const ImVec2& wpos, bool hover, float yMin, float yMax );
bool WantPreprocess() const { return m_wantPreprocess; }
virtual void Preprocess() { assert( false ); }
void VisibilityCheckbox();
virtual void SetVisible( bool visible ) { m_visible = visible; }
virtual bool IsVisible() const { return m_visible; }
@@ -55,6 +59,7 @@ private:
void AdjustThreadHeight( bool firstFrame, int yBegin, int yEnd );
int m_height;
bool m_wantPreprocess;
const void* m_key;