From 0a493d1f3433815122abc56efb163ab97fd02fc4 Mon Sep 17 00:00:00 2001 From: Gabriel Ozouf Date: Tue, 25 Aug 2020 15:25:30 +0200 Subject: [PATCH] [kandinsky/color] Update comment on blend method Change-Id: I5fb68608657d2f604c8cb7c9294382ed4a8603ff --- kandinsky/src/color.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/kandinsky/src/color.cpp b/kandinsky/src/color.cpp index 55bf9e8aa..1aa0225cb 100644 --- a/kandinsky/src/color.cpp +++ b/kandinsky/src/color.cpp @@ -4,7 +4,8 @@ KDColor KDColor::blend(KDColor first, KDColor second, uint8_t alpha) { /* This function is a hot path since it's being called for every single pixel * whenever we want to display a string. In this context, we're quite often * calling it with a value of either 0 or 0xFF, which can be very trivially - * dealt with. So let's make a special case for them. */ + * dealt with. Similarly, blending the same two colors yields a trivial + * result and can be bypassed. Let's make a special case for them. */ if (alpha == 0) { return second; }