mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 22:44:34 +00:00
Store color in message data.
This commit is contained in:
parent
797ebd3caf
commit
4850e19ebd
@ -229,6 +229,7 @@ struct MessageData
|
|||||||
int64_t time;
|
int64_t time;
|
||||||
StringRef ref;
|
StringRef ref;
|
||||||
uint64_t thread;
|
uint64_t thread;
|
||||||
|
uint32_t color;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ThreadData
|
struct ThreadData
|
||||||
|
@ -3063,6 +3063,7 @@ void Worker::ProcessMessage( const QueueMessage& ev )
|
|||||||
msg->time = TscTime( ev.time );
|
msg->time = TscTime( ev.time );
|
||||||
msg->ref = StringRef( StringRef::Type::Idx, it->second.idx );
|
msg->ref = StringRef( StringRef::Type::Idx, it->second.idx );
|
||||||
msg->thread = ev.thread;
|
msg->thread = ev.thread;
|
||||||
|
msg->color = 0xFFFFFFFF;
|
||||||
m_data.lastTime = std::max( m_data.lastTime, msg->time );
|
m_data.lastTime = std::max( m_data.lastTime, msg->time );
|
||||||
InsertMessageData( msg, ev.thread );
|
InsertMessageData( msg, ev.thread );
|
||||||
m_pendingCustomStrings.erase( it );
|
m_pendingCustomStrings.erase( it );
|
||||||
@ -3075,6 +3076,7 @@ void Worker::ProcessMessageLiteral( const QueueMessage& ev )
|
|||||||
msg->time = TscTime( ev.time );
|
msg->time = TscTime( ev.time );
|
||||||
msg->ref = StringRef( StringRef::Type::Ptr, ev.text );
|
msg->ref = StringRef( StringRef::Type::Ptr, ev.text );
|
||||||
msg->thread = ev.thread;
|
msg->thread = ev.thread;
|
||||||
|
msg->color = 0xFFFFFFFF;
|
||||||
m_data.lastTime = std::max( m_data.lastTime, msg->time );
|
m_data.lastTime = std::max( m_data.lastTime, msg->time );
|
||||||
InsertMessageData( msg, ev.thread );
|
InsertMessageData( msg, ev.thread );
|
||||||
}
|
}
|
||||||
@ -3087,6 +3089,7 @@ void Worker::ProcessMessageColor( const QueueMessageColor& ev )
|
|||||||
msg->time = TscTime( ev.time );
|
msg->time = TscTime( ev.time );
|
||||||
msg->ref = StringRef( StringRef::Type::Idx, it->second.idx );
|
msg->ref = StringRef( StringRef::Type::Idx, it->second.idx );
|
||||||
msg->thread = ev.thread;
|
msg->thread = ev.thread;
|
||||||
|
msg->color = 0xFF000000 | ( ev.r << 16 ) | ( ev.g << 8 ) | ev.b;
|
||||||
m_data.lastTime = std::max( m_data.lastTime, msg->time );
|
m_data.lastTime = std::max( m_data.lastTime, msg->time );
|
||||||
InsertMessageData( msg, ev.thread );
|
InsertMessageData( msg, ev.thread );
|
||||||
m_pendingCustomStrings.erase( it );
|
m_pendingCustomStrings.erase( it );
|
||||||
@ -3099,6 +3102,7 @@ void Worker::ProcessMessageLiteralColor( const QueueMessageColor& ev )
|
|||||||
msg->time = TscTime( ev.time );
|
msg->time = TscTime( ev.time );
|
||||||
msg->ref = StringRef( StringRef::Type::Ptr, ev.text );
|
msg->ref = StringRef( StringRef::Type::Ptr, ev.text );
|
||||||
msg->thread = ev.thread;
|
msg->thread = ev.thread;
|
||||||
|
msg->color = 0xFF000000 | ( ev.r << 16 ) | ( ev.g << 8 ) | ev.b;
|
||||||
m_data.lastTime = std::max( m_data.lastTime, msg->time );
|
m_data.lastTime = std::max( m_data.lastTime, msg->time );
|
||||||
InsertMessageData( msg, ev.thread );
|
InsertMessageData( msg, ev.thread );
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user