1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Make display of zone time in frames toggleable.

And disable it by default, as it can be heavy on resources.
This commit is contained in:
Bartosz Taudul 2019-11-10 23:27:37 +01:00
parent fa53c2e683
commit fd7ad586af
2 changed files with 4 additions and 1 deletions

View File

@ -1303,7 +1303,7 @@ void View::DrawFrames()
int i = 0, idx = 0; int i = 0, idx = 0;
#ifndef TRACY_NO_STATISTICS #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& zoneData = m_worker.GetZonesForSourceLocation( m_findZone.match[m_findZone.selMatch] );
auto begin = zoneData.zones.begin(); auto begin = zoneData.zones.begin();
@ -8755,6 +8755,8 @@ void View::DrawFindZone()
ImGui::TreePop(); ImGui::TreePop();
} }
ImGui::Separator();
SmallCheckbox( "Show zone time in frames", &m_findZone.showZoneInFrames );
ImGui::Separator(); ImGui::Separator();
ImGui::TextUnformatted( "Found zones:" ); ImGui::TextUnformatted( "Found zones:" );
ImGui::SameLine(); ImGui::SameLine();

View File

@ -438,6 +438,7 @@ private:
int selCs = 0; int selCs = 0;
int minBinVal = 1; int minBinVal = 1;
int64_t tmin, tmax; int64_t tmin, tmax;
bool showZoneInFrames = false;
struct struct
{ {