mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Display kernel ghost zones with a different color.
This commit is contained in:
parent
4dc05ab858
commit
3968945e6a
@ -4237,7 +4237,19 @@ int View::DrawGhostLevel( const Vector<GhostZone>& vec, bool hover, double pxns,
|
|||||||
const auto isInline = ghostKey.inlineFrame != frame->size-1;
|
const auto isInline = ghostKey.inlineFrame != frame->size-1;
|
||||||
const auto col = isInline ? DarkenColor( color ) : color;
|
const auto col = isInline ? DarkenColor( color ) : color;
|
||||||
auto symName = m_worker.GetString( sym.name );
|
auto symName = m_worker.GetString( sym.name );
|
||||||
uint32_t txtColor = symName[0] == '[' ? 0xFF999999 : 0xFFFFFFFF;
|
uint32_t txtColor;
|
||||||
|
if( symName[0] == '[' )
|
||||||
|
{
|
||||||
|
txtColor = 0xFF999999;
|
||||||
|
}
|
||||||
|
else if( !isInline && ( m_worker.GetCanonicalPointer( ghostKey.frame ) >> 63 != 0 ) )
|
||||||
|
{
|
||||||
|
txtColor = 0xFF8888FF;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
txtColor = 0xFFFFFFFF;
|
||||||
|
}
|
||||||
auto tsz = ImGui::CalcTextSize( symName );
|
auto tsz = ImGui::CalcTextSize( symName );
|
||||||
|
|
||||||
draw->AddRectFilled( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), col );
|
draw->AddRectFilled( wpos + ImVec2( px0, offset ), wpos + ImVec2( px1, offset + tsz.y ), col );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user