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

Add Zone{Text,Value,Name}V macros for conditionally-compiled calls to varname.{Text,Value,Name}

This commit is contained in:
Graydon Hoare
2020-05-27 20:24:13 -07:00
parent 39ce605711
commit afac7760ce
2 changed files with 7 additions and 1 deletions
+6
View File
@@ -17,8 +17,11 @@
#define ZoneScopedNC(x,y)
#define ZoneText(x,y)
#define ZoneTextV(x,y,z)
#define ZoneName(x,y)
#define ZoneNameV(x,y,z)
#define ZoneValue(x)
#define ZoneValueV(x,y)
#define FrameMark
#define FrameMarkNamed(x)
@@ -93,8 +96,11 @@
#define ZoneScopedNC( name, color ) ZoneNamedNC( ___tracy_scoped_zone, name, color, true )
#define ZoneText( txt, size ) ___tracy_scoped_zone.Text( txt, size );
#define ZoneTextV( varname, txt, size ) varname.Text( txt, size );
#define ZoneName( txt, size ) ___tracy_scoped_zone.Name( txt, size );
#define ZoneNameV( varname, txt, size ) varname.Name( txt, size );
#define ZoneValue( value ) ___tracy_scoped_zone.Value( value );
#define ZoneValueV( varname, value ) varname.Value( value );
#define FrameMark tracy::Profiler::SendFrameMark( nullptr );
#define FrameMarkNamed( name ) tracy::Profiler::SendFrameMark( name );