Constify frame-image pointer in API.

This commit is contained in:
Alexander 'z33ky' Hirsch 2019-07-13 12:33:55 +02:00
parent a1ce5fc1f6
commit c6e8dc8d63
3 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,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

@ -2439,7 +2439,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