mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-14 04:01:48 +00:00
Small cleanup.
This commit is contained in:
parent
c92715a6c0
commit
0de755124d
@ -698,7 +698,30 @@ void View::DrawImpl()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Connection window
|
DrawConnection();
|
||||||
|
|
||||||
|
std::lock_guard<std::mutex> lock( m_lock );
|
||||||
|
ImGui::Begin( "Profiler", nullptr, ImGuiWindowFlags_ShowBorders );
|
||||||
|
if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 80, 0 ) ) ) m_pause = !m_pause;
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %-10s Zones: %-10" PRIu64" Queue delay: %s Timer resolution: %s", m_frames.size(), TimeToString( GetLastTime() - m_frames[0] ), TimeToString( m_zvEnd - m_zvStart ), m_zonesCnt, TimeToString( m_delay ), TimeToString( m_resolution ) );
|
||||||
|
DrawFrames();
|
||||||
|
DrawZones();
|
||||||
|
ImGui::End();
|
||||||
|
|
||||||
|
m_zoneHighlight = nullptr;
|
||||||
|
DrawZoneInfoWindow();
|
||||||
|
|
||||||
|
if( m_zvStartNext != 0 )
|
||||||
|
{
|
||||||
|
m_zvStart = m_zvStartNext;
|
||||||
|
m_zvEnd = m_zvEndNext;
|
||||||
|
m_pause = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void View::DrawConnection()
|
||||||
|
{
|
||||||
ImGui::Begin( m_addr.c_str(), nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_ShowBorders );
|
ImGui::Begin( m_addr.c_str(), nullptr, ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_ShowBorders );
|
||||||
{
|
{
|
||||||
std::lock_guard<std::mutex> lock( m_mbpslock );
|
std::lock_guard<std::mutex> lock( m_mbpslock );
|
||||||
@ -735,24 +758,6 @@ void View::DrawImpl()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
|
|
||||||
// Profiler window
|
|
||||||
ImGui::Begin( "Profiler", nullptr, ImGuiWindowFlags_ShowBorders );
|
|
||||||
if( ImGui::Button( m_pause ? "Resume" : "Pause", ImVec2( 80, 0 ) ) ) m_pause = !m_pause;
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::Text( "Frames: %-7" PRIu64 " Time span: %-10s View span: %-10s Zones: %-10" PRIu64" Queue delay: %s Timer resolution: %s", m_frames.size(), TimeToString( GetLastTime() - m_frames[0] ), TimeToString( m_zvEnd - m_zvStart ), m_zonesCnt, TimeToString( m_delay ), TimeToString( m_resolution ) );
|
|
||||||
DrawFrames();
|
|
||||||
DrawZones();
|
|
||||||
m_zoneHighlight = nullptr;
|
|
||||||
DrawZoneInfoWindow();
|
|
||||||
ImGui::End();
|
|
||||||
|
|
||||||
if( m_zvStartNext != 0 )
|
|
||||||
{
|
|
||||||
m_zvStart = m_zvStartNext;
|
|
||||||
m_zvEnd = m_zvEndNext;
|
|
||||||
m_pause = true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static ImU32 GetFrameColor( uint64_t frameTime )
|
static ImU32 GetFrameColor( uint64_t frameTime )
|
||||||
|
@ -82,6 +82,7 @@ private:
|
|||||||
const QueueSourceLocation& GetSourceLocation( uint64_t srcloc ) const;
|
const QueueSourceLocation& GetSourceLocation( uint64_t srcloc ) const;
|
||||||
|
|
||||||
void DrawImpl();
|
void DrawImpl();
|
||||||
|
void DrawConnection();
|
||||||
void DrawFrames();
|
void DrawFrames();
|
||||||
void DrawZones();
|
void DrawZones();
|
||||||
int DrawZoneLevel( const Vector<Event*>& vec, bool hover, double pxns, const ImVec2& wpos, int offset, int depth );
|
int DrawZoneLevel( const Vector<Event*>& vec, bool hover, double pxns, const ImVec2& wpos, int offset, int depth );
|
||||||
|
Loading…
Reference in New Issue
Block a user