Allow getting zone color sans higlights, etc.

This commit is contained in:
Bartosz Taudul 2019-09-08 13:16:00 +02:00
parent 6ef282dd1a
commit b7522ec4c1
2 changed files with 15 additions and 3 deletions

View File

@ -11827,12 +11827,17 @@ uint32_t View::GetZoneColor( const ZoneEvent& ev )
} }
else else
{ {
const auto& srcloc = m_worker.GetSourceLocation( ev.SrcLoc() ); return GetRawZoneColor( ev );
const auto color = srcloc.color;
return color != 0 ? ( color | 0xFF000000 ) : 0xFFCC5555;
} }
} }
uint32_t View::GetRawZoneColor( const ZoneEvent& ev )
{
const auto& srcloc = m_worker.GetSourceLocation( ev.SrcLoc() );
const auto color = srcloc.color;
return color != 0 ? ( color | 0xFF000000 ) : 0xFFCC5555;
}
uint32_t View::GetZoneColor( const GpuEvent& ev ) uint32_t View::GetZoneColor( const GpuEvent& ev )
{ {
const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc ); const auto& srcloc = m_worker.GetSourceLocation( ev.srcloc );
@ -11840,6 +11845,11 @@ uint32_t View::GetZoneColor( const GpuEvent& ev )
return color != 0 ? ( color | 0xFF000000 ) : 0xFF222288; return color != 0 ? ( color | 0xFF000000 ) : 0xFF222288;
} }
uint32_t View::GetRawZoneColor( const GpuEvent& ev )
{
return GetZoneColor( ev );
}
uint32_t View::GetZoneHighlight( const ZoneEvent& ev ) uint32_t View::GetZoneHighlight( const ZoneEvent& ev )
{ {
if( m_zoneInfoWindow == &ev ) if( m_zoneInfoWindow == &ev )

View File

@ -156,6 +156,8 @@ private:
uint32_t GetZoneColor( const ZoneEvent& ev ); uint32_t GetZoneColor( const ZoneEvent& ev );
uint32_t GetZoneColor( const GpuEvent& ev ); uint32_t GetZoneColor( const GpuEvent& ev );
uint32_t GetRawZoneColor( const ZoneEvent& ev );
uint32_t GetRawZoneColor( const GpuEvent& ev );
uint32_t GetZoneHighlight( const ZoneEvent& ev ); uint32_t GetZoneHighlight( const ZoneEvent& ev );
uint32_t GetZoneHighlight( const GpuEvent& ev ); uint32_t GetZoneHighlight( const GpuEvent& ev );
float GetZoneThickness( const ZoneEvent& ev ); float GetZoneThickness( const ZoneEvent& ev );