mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Add C API for frame markup.
This commit is contained in:
parent
ee99ce833c
commit
48e08acb62
18
TracyC.h
18
TracyC.h
@ -25,6 +25,12 @@ typedef const void* TracyCZoneCtx;
|
||||
#define TracyCAlloc(x,y)
|
||||
#define TracyCFree(x)
|
||||
|
||||
#define TracyCFrameMark
|
||||
#define TracyCFrameMarkNamed(x)
|
||||
#define TracyCFrameMarkStart(x)
|
||||
#define TracyCFrameMarkEnd(x)
|
||||
#define TracyCFrameImage(x,y,z,w,a)
|
||||
|
||||
#else
|
||||
|
||||
#ifndef TracyConcat
|
||||
@ -88,6 +94,18 @@ void ___tracy_emit_memory_free_callstack( const void* ptr, int depth );
|
||||
# define TracyCFree( ptr ) ___tracy_emit_memory_free( ptr );
|
||||
#endif
|
||||
|
||||
|
||||
void ___tracy_emit_frame_mark( const char* name );
|
||||
void ___tracy_emit_frame_mark_start( const char* name );
|
||||
void ___tracy_emit_frame_mark_end( const char* name );
|
||||
void ___tracy_emit_frame_image( void* image, uint16_t w, uint16_t h, uint8_t offset, int flip );
|
||||
|
||||
#define TracyCFrameMark ___tracy_emit_frame_mark( 0 );
|
||||
#define TracyCFrameMarkNamed( name ) ___tracy_emit_frame_mark( name );
|
||||
#define TracyCFrameMarkStart( name ) ___tracy_emit_frame_mark_start( name );
|
||||
#define TracyCFrameMarkEnd( name ) ___tracy_emit_frame_mark_end( name );
|
||||
#define TracyCFrameImage( image, width, height, offset, flip ) ___tracy_emit_frame_image( image, width, height, offset, flip );
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -2264,6 +2264,26 @@ void ___tracy_emit_memory_free_callstack( const void* ptr, int depth )
|
||||
tracy::Profiler::MemFreeCallstack( ptr, depth );
|
||||
}
|
||||
|
||||
void ___tracy_emit_frame_mark( const char* name )
|
||||
{
|
||||
tracy::Profiler::SendFrameMark( name );
|
||||
}
|
||||
|
||||
void ___tracy_emit_frame_mark_start( const char* name )
|
||||
{
|
||||
tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgStart );
|
||||
}
|
||||
|
||||
void ___tracy_emit_frame_mark_end( const char* name )
|
||||
{
|
||||
tracy::Profiler::SendFrameMark( name, tracy::QueueType::FrameMarkMsgEnd );
|
||||
}
|
||||
|
||||
void ___tracy_emit_frame_image( void* image, uint16_t w, uint16_t h, uint8_t offset, int flip )
|
||||
{
|
||||
tracy::Profiler::SendFrameImage( image, w, h, offset, flip );
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user