Merged in z33ky/tracy/const-frame-image (pull request #37)

Constify frame-image pointer in API.
This commit is contained in:
Alex 2019-07-13 13:09:21 +00:00 committed by Bartosz Taudul
commit 0c5ea710b0
3 changed files with 3 additions and 3 deletions

View File

@ -107,7 +107,7 @@ void ___tracy_emit_memory_free_callstack( const void* ptr, int depth );
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 );
void ___tracy_emit_frame_image( const 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 );

View File

@ -2459,7 +2459,7 @@ void ___tracy_emit_memory_free_callstack( const void* ptr, int depth ) { tracy::
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 ); }
void ___tracy_emit_frame_image( const void* image, uint16_t w, uint16_t h, uint8_t offset, int flip ) { tracy::Profiler::SendFrameImage( image, w, h, offset, flip ); }
void ___tracy_emit_plot( const char* name, double val ) { tracy::Profiler::PlotData( name, val ); }
void ___tracy_emit_message( const char* txt, size_t size ) { tracy::Profiler::Message( txt, size ); }
void ___tracy_emit_messageL( const char* txt ) { tracy::Profiler::Message( txt ); }

View File

@ -183,7 +183,7 @@ public:
GetProfiler().m_serialLock.unlock();
}
static tracy_force_inline void SendFrameImage( void* image, uint16_t w, uint16_t h, uint8_t offset, bool flip )
static tracy_force_inline void SendFrameImage( const void* image, uint16_t w, uint16_t h, uint8_t offset, bool flip )
{
auto& profiler = GetProfiler();
#ifdef TRACY_ON_DEMAND