Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/44375 )
Change subject: libpayload: cbgfx: Add color mapping functionality ......................................................................
Patch Set 2:
(2 comments)
Patch Set 1:
(2 comments)
Neat! Does it work (i.e. look right)?
Yup. The buttons look exactly the same as before.
https://review.coreboot.org/c/coreboot/+/44375/1/payloads/libpayload/drivers... File payloads/libpayload/drivers/video/graphics.c:
https://review.coreboot.org/c/coreboot/+/44375/1/payloads/libpayload/drivers... PS1, Line 221: (UINT8_MAX - color)
It took me embarrasingly long to figure out what you're doing here and why what I wrote in the bug w […]
Let's use
bg_color + (fg_color - bg_color) * color / UINT8_MAX
https://review.coreboot.org/c/coreboot/+/44375/1/payloads/libpayload/drivers... PS1, Line 222: int16_t
This should be unnecessary (automatic integer promotion to `int`). […]
Done. Learned something about integer promotion today.