GPU zone highlight.

This commit is contained in:
Bartosz Taudul 2017-11-12 01:28:07 +01:00
parent e40f029b19
commit cff8f9ebd7
2 changed files with 10 additions and 1 deletions

View File

@ -1526,7 +1526,10 @@ void View::DrawImpl()
ImGui::End(); ImGui::End();
m_zoneHighlight = nullptr; m_zoneHighlight = nullptr;
m_gpuHighlight = nullptr;
DrawInfoWindow(); DrawInfoWindow();
if( m_showOptions ) DrawOptions(); if( m_showOptions ) DrawOptions();
if( m_showMessages ) DrawMessages(); if( m_showMessages ) DrawMessages();
@ -3382,6 +3385,7 @@ void View::DrawGpuInfoWindow()
ImGui::Text( "%s", GetString( cev.name ) ); ImGui::Text( "%s", GetString( cev.name ) );
if( ImGui::IsItemHovered() ) if( ImGui::IsItemHovered() )
{ {
m_gpuHighlight = &cev;
if( ImGui::IsMouseClicked( 0 ) ) if( ImGui::IsMouseClicked( 0 ) )
{ {
m_gpuInfoWindow = &cev; m_gpuInfoWindow = &cev;
@ -3517,6 +3521,10 @@ uint32_t View::GetZoneHighlight( const GpuEvent& ev )
{ {
return 0xFF44DD44; return 0xFF44DD44;
} }
else if( m_gpuHighlight == &ev )
{
return 0xFF4444FF;
}
else else
{ {
const auto color = GetZoneColor( ev ); const auto color = GetZoneColor( ev );
@ -3541,7 +3549,7 @@ float View::GetZoneThickness( const ZoneEvent& ev )
float View::GetZoneThickness( const GpuEvent& ev ) float View::GetZoneThickness( const GpuEvent& ev )
{ {
if( m_gpuInfoWindow == &ev ) if( m_gpuInfoWindow == &ev || m_gpuHighlight == &ev )
{ {
return 3.f; return 3.f;
} }

View File

@ -235,6 +235,7 @@ private:
LockHighlight m_lockHighlight; LockHighlight m_lockHighlight;
const MessageData* m_msgHighlight; const MessageData* m_msgHighlight;
const GpuEvent* m_gpuInfoWindow; const GpuEvent* m_gpuInfoWindow;
const GpuEvent* m_gpuHighlight;
bool m_drawRegion; bool m_drawRegion;
int64_t m_regionStart; int64_t m_regionStart;