From c6e8dc8d630972f1bb19be1a0cd0525935b33837 Mon Sep 17 00:00:00 2001 From: Alexander 'z33ky' Hirsch <1zeeky@gmail.com> Date: Sat, 13 Jul 2019 12:33:55 +0200 Subject: [PATCH] Constify frame-image pointer in API. --- TracyC.h | 2 +- client/TracyProfiler.cpp | 2 +- client/TracyProfiler.hpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/TracyC.h b/TracyC.h index c5137cd5..235a36c0 100644 --- a/TracyC.h +++ b/TracyC.h @@ -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 ); diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 1f5cc916..d06223f8 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -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 ); } diff --git a/client/TracyProfiler.hpp b/client/TracyProfiler.hpp index 2a8f8aa3..045059f0 100644 --- a/client/TracyProfiler.hpp +++ b/client/TracyProfiler.hpp @@ -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