mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-10 02:31:48 +00:00
Fix message color component names in the protocol.
Red and blue channels were mislabeled. Otherwise, coding and decoding was performed correctly, as far as the color channel order described in the manual is followed by the user. No change to the binary protocol was made.
This commit is contained in:
parent
c59413ab56
commit
eb7c13e7bb
@ -414,9 +414,9 @@ public:
|
|||||||
TracyQueuePrepare( callstack == 0 ? QueueType::MessageColor : QueueType::MessageColorCallstack );
|
TracyQueuePrepare( callstack == 0 ? QueueType::MessageColor : QueueType::MessageColorCallstack );
|
||||||
MemWrite( &item->messageColorFat.time, GetTime() );
|
MemWrite( &item->messageColorFat.time, GetTime() );
|
||||||
MemWrite( &item->messageColorFat.text, (uint64_t)ptr );
|
MemWrite( &item->messageColorFat.text, (uint64_t)ptr );
|
||||||
MemWrite( &item->messageColorFat.r, uint8_t( ( color ) & 0xFF ) );
|
MemWrite( &item->messageColorFat.b, uint8_t( ( color ) & 0xFF ) );
|
||||||
MemWrite( &item->messageColorFat.g, uint8_t( ( color >> 8 ) & 0xFF ) );
|
MemWrite( &item->messageColorFat.g, uint8_t( ( color >> 8 ) & 0xFF ) );
|
||||||
MemWrite( &item->messageColorFat.b, uint8_t( ( color >> 16 ) & 0xFF ) );
|
MemWrite( &item->messageColorFat.r, uint8_t( ( color >> 16 ) & 0xFF ) );
|
||||||
MemWrite( &item->messageColorFat.size, (uint16_t)size );
|
MemWrite( &item->messageColorFat.size, (uint16_t)size );
|
||||||
TracyQueueCommit( messageColorFatThread );
|
TracyQueueCommit( messageColorFatThread );
|
||||||
}
|
}
|
||||||
@ -434,9 +434,9 @@ public:
|
|||||||
TracyQueuePrepare( callstack == 0 ? QueueType::MessageLiteralColor : QueueType::MessageLiteralColorCallstack );
|
TracyQueuePrepare( callstack == 0 ? QueueType::MessageLiteralColor : QueueType::MessageLiteralColorCallstack );
|
||||||
MemWrite( &item->messageColorLiteral.time, GetTime() );
|
MemWrite( &item->messageColorLiteral.time, GetTime() );
|
||||||
MemWrite( &item->messageColorLiteral.text, (uint64_t)txt );
|
MemWrite( &item->messageColorLiteral.text, (uint64_t)txt );
|
||||||
MemWrite( &item->messageColorLiteral.r, uint8_t( ( color ) & 0xFF ) );
|
MemWrite( &item->messageColorLiteral.b, uint8_t( ( color ) & 0xFF ) );
|
||||||
MemWrite( &item->messageColorLiteral.g, uint8_t( ( color >> 8 ) & 0xFF ) );
|
MemWrite( &item->messageColorLiteral.g, uint8_t( ( color >> 8 ) & 0xFF ) );
|
||||||
MemWrite( &item->messageColorLiteral.b, uint8_t( ( color >> 16 ) & 0xFF ) );
|
MemWrite( &item->messageColorLiteral.r, uint8_t( ( color >> 16 ) & 0xFF ) );
|
||||||
TracyQueueCommit( messageColorLiteralThread );
|
TracyQueueCommit( messageColorLiteralThread );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -342,9 +342,9 @@ struct QueueMessage
|
|||||||
|
|
||||||
struct QueueMessageColor : public QueueMessage
|
struct QueueMessageColor : public QueueMessage
|
||||||
{
|
{
|
||||||
uint8_t r;
|
|
||||||
uint8_t g;
|
|
||||||
uint8_t b;
|
uint8_t b;
|
||||||
|
uint8_t g;
|
||||||
|
uint8_t r;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct QueueMessageLiteral : public QueueMessage
|
struct QueueMessageLiteral : public QueueMessage
|
||||||
|
@ -5625,7 +5625,7 @@ void Worker::ProcessMessageColor( const QueueMessageColor& ev )
|
|||||||
msg->time = time;
|
msg->time = time;
|
||||||
msg->ref = StringRef( StringRef::Type::Idx, GetSingleStringIdx() );
|
msg->ref = StringRef( StringRef::Type::Idx, GetSingleStringIdx() );
|
||||||
msg->thread = CompressThread( td->id );
|
msg->thread = CompressThread( td->id );
|
||||||
msg->color = 0xFF000000 | ( ev.r << 16 ) | ( ev.g << 8 ) | ev.b;
|
msg->color = 0xFF000000 | ( ev.b << 16 ) | ( ev.g << 8 ) | ev.r;
|
||||||
msg->callstack.SetVal( 0 );
|
msg->callstack.SetVal( 0 );
|
||||||
if( m_data.lastTime < time ) m_data.lastTime = time;
|
if( m_data.lastTime < time ) m_data.lastTime = time;
|
||||||
InsertMessageData( msg );
|
InsertMessageData( msg );
|
||||||
@ -5640,7 +5640,7 @@ void Worker::ProcessMessageLiteralColor( const QueueMessageColorLiteral& ev )
|
|||||||
msg->time = time;
|
msg->time = time;
|
||||||
msg->ref = StringRef( StringRef::Type::Ptr, ev.text );
|
msg->ref = StringRef( StringRef::Type::Ptr, ev.text );
|
||||||
msg->thread = CompressThread( td->id );
|
msg->thread = CompressThread( td->id );
|
||||||
msg->color = 0xFF000000 | ( ev.r << 16 ) | ( ev.g << 8 ) | ev.b;
|
msg->color = 0xFF000000 | ( ev.b << 16 ) | ( ev.g << 8 ) | ev.r;
|
||||||
msg->callstack.SetVal( 0 );
|
msg->callstack.SetVal( 0 );
|
||||||
if( m_data.lastTime < time ) m_data.lastTime = time;
|
if( m_data.lastTime < time ) m_data.lastTime = time;
|
||||||
InsertMessageData( msg );
|
InsertMessageData( msg );
|
||||||
|
Loading…
Reference in New Issue
Block a user