From fd7ad586af0bda9e808ab6874cfc5487ecac62e6 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sun, 10 Nov 2019 23:27:37 +0100 Subject: [PATCH] Make display of zone time in frames toggleable. And disable it by default, as it can be heavy on resources. --- server/TracyView.cpp | 4 +++- server/TracyView.hpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index 4534b884..43695a3a 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1303,7 +1303,7 @@ void View::DrawFrames() int i = 0, idx = 0; #ifndef TRACY_NO_STATISTICS - if( m_worker.AreSourceLocationZonesReady() && m_findZone.show && !m_findZone.match.empty() ) + if( m_worker.AreSourceLocationZonesReady() && m_findZone.show && m_findZone.showZoneInFrames && !m_findZone.match.empty() ) { auto& zoneData = m_worker.GetZonesForSourceLocation( m_findZone.match[m_findZone.selMatch] ); auto begin = zoneData.zones.begin(); @@ -8755,6 +8755,8 @@ void View::DrawFindZone() ImGui::TreePop(); } + ImGui::Separator(); + SmallCheckbox( "Show zone time in frames", &m_findZone.showZoneInFrames ); ImGui::Separator(); ImGui::TextUnformatted( "Found zones:" ); ImGui::SameLine(); diff --git a/server/TracyView.hpp b/server/TracyView.hpp index 7614bcb8..7ba212ad 100644 --- a/server/TracyView.hpp +++ b/server/TracyView.hpp @@ -438,6 +438,7 @@ private: int selCs = 0; int minBinVal = 1; int64_t tmin, tmax; + bool showZoneInFrames = false; struct {