hw/display/tcx: Drop unnecessary code for handling BGR format outputs
commit7713fff47d31e7607e52c9247fb7b628ed6bb096
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 15 Feb 2021 10:21:49 +0000 (15 10:21 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Sat, 6 Mar 2021 13:30:38 +0000 (6 13:30 +0000)
treed3fd16d40d46d47eb8d534280580e1804a405f77
parentcfb08215ca3b8df4662e08328f91d43c2603f4b2
hw/display/tcx: Drop unnecessary code for handling BGR format outputs

For a long time now the UI layer has guaranteed that the console
surface is always 32 bits per pixel, RGB. The TCX code already
assumes 32bpp, but it still has some checks of is_surface_bgr()
in an attempt to support 32bpp BGR. is_surface_bgr() will always
return false for the qemu_console_surface(), unless the display
device itself has deliberately created an alternate-format
surface via a function like qemu_create_displaysurface_from().

Drop the never-used BGR-handling code, and assert that we have
a 32-bit surface rather than just doing nothing if it isn't.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-id: 20210215102149.20513-1-peter.maydell@linaro.org
hw/display/tcx.c