diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 35845ae2..dbb5c2af 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1115,6 +1115,29 @@ bool View::DrawConnection() } } + const auto& fis = m_worker.GetFrameImages(); + if( !fis.empty() ) + { + const auto scale = ImGui::GetTextLineHeight() / 15.f * 0.5f; + const auto& fi = fis.back(); + if( fi != m_frameTextureConnPtr ) + { + if( !m_frameTextureConn ) m_frameTextureConn = MakeTexture(); + UpdateTexture( m_frameTextureConn, m_worker.UnpackFrameImage( *fi ), fi->w, fi->h ); + m_frameTextureConnPtr = fi; + } + ImGui::Separator(); + if( fi->flip ) + { + ImGui::Image( m_frameTextureConn, ImVec2( fi->w * scale, fi->h * scale ), ImVec2( 0, 1 ), ImVec2( 1, 0 ) ); + } + else + { + ImGui::Image( m_frameTextureConn, ImVec2( fi->w * scale, fi->h * scale ) ); + } + } + + ImGui::Separator(); if( ImGui::Button( ICON_FA_SAVE " Save trace" ) && m_saveThreadState.load( std::memory_order_relaxed ) == SaveThreadState::Inert ) { #ifndef TRACY_NO_FILESELECTOR diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 2290335a..8febe3bc 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -454,6 +454,9 @@ private: void* m_frameTexture = nullptr; const void* m_frameTexturePtr = nullptr; + void* m_frameTextureConn = nullptr; + const void* m_frameTextureConnPtr = nullptr; + std::vector> m_annotations; UserData m_userData;