@@ -49,13 +49,13 @@ uint32_t View::GetSrcLocColor( const SourceLocation& srcloc, int depth )
4949 return GetRawSrcLocColor ( srcloc, depth );
5050}
5151
52- uint32_t View::GetZoneColor ( const ZoneEvent& ev, uint64_t thread, int depth )
52+ uint32_t View::GetZoneColor ( const ZoneEventC ev, uint64_t thread, int depth )
5353{
5454 const auto sl = ev.SrcLoc ();
5555 const auto & srcloc = m_worker.GetSourceLocation ( sl );
5656 if ( !m_vd.forceColors )
5757 {
58- if ( m_worker.HasZoneExtra ( ev ) )
58+ if ( m_worker.HasZoneExtra ( *ev. event ) )
5959 {
6060 const auto custom_color = m_worker.GetZoneExtra ( ev ).color .Val ();
6161 if ( custom_color != 0 ) return custom_color | 0xFF000000 ;
@@ -77,25 +77,18 @@ uint32_t View::GetZoneColor( const ZoneEvent& ev, uint64_t thread, int depth )
7777 }
7878}
7979
80- uint32_t View::GetZoneColor ( const ZoneEvent& ev )
81- {
82- const auto & srcloc = m_worker.GetSourceLocation ( ev.SrcLoc () );
83- const auto color = srcloc.color ;
84- return color != 0 ? ( color | 0xFF000000 ) : 0xFF222288 ;
85- }
86-
87- View::ZoneColorData View::GetZoneColorData ( const ZoneEvent& ev, uint64_t thread, int depth, uint32_t inheritedColor )
80+ View::ZoneColorData View::GetZoneColorData ( const ZoneEventC ev, uint64_t thread, int depth, uint32_t inheritedColor )
8881{
8982 ZoneColorData ret;
9083 const auto & srcloc = ev.SrcLoc ();
91- if ( m_zoneInfoWindow == &ev )
84+ if ( m_zoneInfoWindow == ev. event )
9285 {
9386 ret.color = inheritedColor ? inheritedColor : GetZoneColor ( ev, thread, depth );
9487 ret.accentColor = 0xFF44DD44 ;
9588 ret.thickness = 3 .f ;
9689 ret.highlight = true ;
9790 }
98- else if ( m_zoneHighlight == &ev )
91+ else if ( m_zoneHighlight == ev. event )
9992 {
10093 ret.color = inheritedColor ? inheritedColor : GetZoneColor ( ev, thread, depth );
10194 ret.accentColor = 0xFF4444FF ;
@@ -136,33 +129,6 @@ View::ZoneColorData View::GetZoneColorData( const ZoneEvent& ev, uint64_t thread
136129 return ret;
137130}
138131
139- View::ZoneColorData View::GetZoneColorData ( const ZoneEvent& ev )
140- {
141- ZoneColorData ret;
142- const auto color = GetZoneColor ( ev );
143- ret.color = color;
144- if ( m_gpuInfoWindow == &ev )
145- {
146- ret.accentColor = 0xFF44DD44 ;
147- ret.thickness = 3 .f ;
148- ret.highlight = true ;
149- }
150- else if ( m_gpuHighlight == &ev )
151- {
152- ret.accentColor = 0xFF4444FF ;
153- ret.thickness = 3 .f ;
154- ret.highlight = true ;
155- }
156- else
157- {
158- ret.accentColor = HighlightColor ( color );
159- ret.thickness = 1 .f ;
160- ret.highlight = false ;
161- }
162- return ret;
163- }
164-
165-
166132const ZoneEvent* View::FindZoneAtTime ( uint64_t thread, int64_t time ) const
167133{
168134 // TODO add thread rev-map
0 commit comments