mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[kandinsky/color] Update comment on blend method
Change-Id: I5fb68608657d2f604c8cb7c9294382ed4a8603ff
This commit is contained in:
committed by
EmilieNumworks
parent
e33543aacb
commit
0a493d1f34
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user