From 9fe9cf636824951f8cafa8c3a91d794ee699f07c Mon Sep 17 00:00:00 2001 From: Sean Wilson Date: Thu, 21 Mar 2024 22:07:00 -0400 Subject: [PATCH] Optimize lv_color_16_16_mix() when c1 == c2 (#5929) --- src/misc/lv_color.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/misc/lv_color.h b/src/misc/lv_color.h index c594ef747b..8fe2558e32 100644 --- a/src/misc/lv_color.h +++ b/src/misc/lv_color.h @@ -348,6 +348,7 @@ static inline uint16_t LV_ATTRIBUTE_FAST_MEM lv_color_16_16_mix(uint16_t c1, uin { if(mix == 255) return c1; if(mix == 0) return c2; + if(c1 == c2) return c1; uint16_t ret;