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

Zone text (custom string) transfer.

This commit is contained in:
Bartosz Taudul
2017-09-27 02:18:17 +02:00
parent 3c0ce01954
commit d1bbb731fc
9 changed files with 93 additions and 6 deletions
+8
View File
@@ -22,6 +22,14 @@ public:
Profiler::ZoneEnd( m_id, QueueZoneEnd { Profiler::GetTime() } );
}
void Text( const char* txt, size_t size )
{
auto ptr = new char[size+1];
memcpy( ptr, txt, size );
ptr[size] = '\0';
Profiler::ZoneText( m_id, QueueZoneText { (uint64_t)ptr } );
}
private:
uint64_t m_id;
};