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

Migrate drawing GPU data to the new timeline item system.

This commit is contained in:
Bartosz Taudul
2022-09-04 13:38:19 +02:00
parent ec3e88ce53
commit 60579d6334
8 changed files with 603 additions and 545 deletions
+38
View File
@@ -0,0 +1,38 @@
#ifndef __TRACYTIMELINEITEMGPU_HPP__
#define __TRACYTIMELINEITEMGPU_HPP__
#include "TracyEvent.hpp"
#include "TracyTimelineItem.hpp"
namespace tracy
{
class TimelineItemGpu final : public TimelineItem
{
public:
TimelineItemGpu( View& view, Worker& worker, GpuCtxData* gpu );
protected:
uint32_t HeaderColor() const override { return 0xFFFFAAAA; }
uint32_t HeaderColorInactive() const override { return 0xFF886666; }
uint32_t HeaderLineColor() const override { return 0x33FFFFFF; }
const char* HeaderLabel() const override;
int64_t RangeBegin() const override;
int64_t RangeEnd() const override;
void HeaderTooltip( const char* label ) const override;
void HeaderExtraContents( int offset, const ImVec2& wpos, float labelWidth, double pxns, bool hover ) override;
bool DrawContents( double pxns, int& offset, const ImVec2& wpos, bool hover, float yMin, float yMax ) override;
bool IsEmpty() const override;
private:
GpuCtxData* m_gpu;
int m_idx;
};
}
#endif