coreboot-kgpe-d16/payloads/libpayload/drivers
Yu-Ping Wu 1c3faabf24 libpayload/cbgfx: Remove gap between adjacent boxes
When drawing two adjacent boxes with draw_box(), there will be a gap
between them. This is due to the truncation in integer division when
calculating the bottom right coordinate of the box.

In this patch, the relative bottom right coordinate is calculated before
transforming to an absolute one. The same issue is also fixed for
draw_rounded_box().

Also check validity of 'pos_rel' and 'dim_rel' arguments for
draw_rounded_box().

BRANCH=none
BUG=chromium:1082593
TEST=emerge-nami libpayload

Change-Id: I073cf8ec6eb3952a0dcb417b4c3c3c7047567837
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41392
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2020-05-26 15:03:59 +00:00
..
i8042 treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
serial treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
storage treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
timer treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
udc treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
usb treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
video libpayload/cbgfx: Remove gap between adjacent boxes 2020-05-26 15:03:59 +00:00
Makefile.inc treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
cbmem_console.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
hid.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
mouse_cursor.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
nvram.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
options.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
pci.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00
speaker.c treewide: Remove "this file is part of" lines 2020-05-11 17:11:40 +00:00