From 4c736aecfa8f9bc3523e86fc33c81464f2974821 Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Sat, 21 Sep 2019 14:03:42 +0200 Subject: [PATCH] Use fibonacci hashing to determine thread colors. --- server/TracyView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/TracyView.cpp b/server/TracyView.cpp index d5d11a4a..e97ca35a 100644 --- a/server/TracyView.cpp +++ b/server/TracyView.cpp @@ -12140,7 +12140,7 @@ uint32_t View::GetThreadColor( uint64_t thread, int depth ) { if( !m_vd.dynamicColors ) return 0xFFCC5555; - const uint8_t h = thread & 0xFF; + const uint8_t h = ( thread * 11400714819323198485ull ) & 0xFF; const uint8_t s = 96; const uint8_t v = std::max( 96, 170 - depth * 8 );