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

Calculate which CPU zones to draw beforehand.

This commit is contained in:
Bartosz Taudul
2023-03-19 16:11:18 +01:00
parent b4893fafb7
commit 1d7afbd07e
3 changed files with 207 additions and 1 deletions
+15
View File
@@ -3,6 +3,7 @@
#include "TracyEvent.hpp"
#include "TracyTimelineItem.hpp"
#include "TracyTimelineDraw.hpp"
namespace tracy
{
@@ -26,12 +27,26 @@ protected:
bool DrawContents( const TimelineContext& ctx, int& offset ) override;
void DrawOverlay( const ImVec2& ul, const ImVec2& dr ) override;
void DrawFinished() override;
bool IsEmpty() const override;
void Preprocess( const TimelineContext& ctx ) override;
private:
#ifndef TRACY_NO_STATISTICS
int PreprocessGhostLevel( const TimelineContext& ctx, const Vector<GhostZone>& vec, int depth );
#endif
int PreprocessZoneLevel( const TimelineContext& ctx, const Vector<short_ptr<ZoneEvent>>& vec, int depth );
template<typename Adapter, typename V>
int PreprocessZoneLevel( const TimelineContext& ctx, const V& vec, int depth );
const ThreadData* m_thread;
bool m_ghost;
std::vector<TimelineDraw> m_draw;
int m_depth;
};
}