From cff8f9ebd77a81d1bfd724f6af4392e4e622f2c5 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 12 Nov 2017 01:28:07 +0100 Subject: [PATCH] GPU zone highlight. --- server/TracyView.cpp | 10 +++++++++- server/TracyView.hpp | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 537af6ea..28b97237 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1526,7 +1526,10 @@ void View::DrawImpl() ImGui::End(); m_zoneHighlight = nullptr; + m_gpuHighlight = nullptr; + DrawInfoWindow(); + if( m_showOptions ) DrawOptions(); if( m_showMessages ) DrawMessages(); @@ -3382,6 +3385,7 @@ void View::DrawGpuInfoWindow() ImGui::Text( "%s", GetString( cev.name ) ); if( ImGui::IsItemHovered() ) { + m_gpuHighlight = &cev; if( ImGui::IsMouseClicked( 0 ) ) { m_gpuInfoWindow = &cev; @@ -3517,6 +3521,10 @@ uint32_t View::GetZoneHighlight( const GpuEvent& ev ) { return 0xFF44DD44; } + else if( m_gpuHighlight == &ev ) + { + return 0xFF4444FF; + } else { const auto color = GetZoneColor( ev ); @@ -3541,7 +3549,7 @@ float View::GetZoneThickness( const ZoneEvent& ev ) float View::GetZoneThickness( const GpuEvent& ev ) { - if( m_gpuInfoWindow == &ev ) + if( m_gpuInfoWindow == &ev || m_gpuHighlight == &ev ) { return 3.f; } diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 3c103675..670007f1 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -235,6 +235,7 @@ private: LockHighlight m_lockHighlight; const MessageData* m_msgHighlight; const GpuEvent* m_gpuInfoWindow; + const GpuEvent* m_gpuHighlight; bool m_drawRegion; int64_t m_regionStart;