From f9ff6f4161614b51ca5f93e2794c8d5a6e24100d Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Fri, 15 May 2020 02:30:52 +0200 Subject: [PATCH] Clamping is not needed. --- server/TracyView.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index ecea417b..5209f6d7 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -1858,17 +1858,17 @@ bool View::DrawZoneFramesHeader() static uint32_t DarkenColor( uint32_t color ) { return 0xFF000000 | - ( std::min( 0xFF, ( ( ( color & 0x00FF0000 ) >> 16 ) * 2 / 3 ) ) << 16 ) | - ( std::min( 0xFF, ( ( ( color & 0x0000FF00 ) >> 8 ) * 2 / 3 ) ) << 8 ) | - ( std::min( 0xFF, ( ( ( color & 0x000000FF ) ) * 2 / 3 ) ) ); + ( ( ( ( color & 0x00FF0000 ) >> 16 ) * 2 / 3 ) << 16 ) | + ( ( ( ( color & 0x0000FF00 ) >> 8 ) * 2 / 3 ) << 8 ) | + ( ( ( ( color & 0x000000FF ) ) * 2 / 3 ) ); } static uint32_t MixGhostColor( uint32_t c0, uint32_t c1 ) { return 0xFF000000 | - ( std::min( 0xFF, ( ( ( ( c0 & 0x00FF0000 ) >> 16 ) + 3 * ( ( c1 & 0x00FF0000 ) >> 16 ) ) >> 2 ) ) << 16 ) | - ( std::min( 0xFF, ( ( ( ( c0 & 0x0000FF00 ) >> 8 ) + 3 * ( ( c1 & 0x0000FF00 ) >> 8 ) ) >> 2 ) ) << 8 ) | - ( std::min( 0xFF, ( ( ( ( c0 & 0x000000FF ) ) + 3 * ( ( c1 & 0x000000FF ) ) ) >> 2 ) ) ); + ( ( ( ( ( c0 & 0x00FF0000 ) >> 16 ) + 3 * ( ( c1 & 0x00FF0000 ) >> 16 ) ) >> 2 ) << 16 ) | + ( ( ( ( ( c0 & 0x0000FF00 ) >> 8 ) + 3 * ( ( c1 & 0x0000FF00 ) >> 8 ) ) >> 2 ) << 8 ) | + ( ( ( ( ( c0 & 0x000000FF ) ) + 3 * ( ( c1 & 0x000000FF ) ) ) >> 2 ) ); } static void DrawZigZag( ImDrawList* draw, const ImVec2& wpos, double start, double end, double h, uint32_t color, float thickness = 1.f )