summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-2bit-vi.c
diff options
context:
space:
mode:
authorAidan MacDonald <amachronic@protonmail.com>2022-10-02 01:32:16 +0100
committerAidan MacDonald <amachronic@protonmail.com>2022-10-12 07:58:57 -0400
commit44b9785465fcb96f7544576b7657a47813625a01 (patch)
tree8dcc0189d1c073375a78d24279a2801e2cc630e8 /firmware/drivers/lcd-2bit-vi.c
parentf737e5025d6cb2d3a283aa336c072701d1adc83f (diff)
downloadrockbox-44b9785465fcb96f7544576b7657a47813625a01.tar.gz
rockbox-44b9785465fcb96f7544576b7657a47813625a01.zip
lcd: Move grayscale clear_viewport() to lcd-bitmap-common.c
All grayscale LCDs have the same clear_viewport() implementation. Change-Id: I087ac3be824c97a1f42857b4e2fedb0675d453fa
Diffstat (limited to 'firmware/drivers/lcd-2bit-vi.c')
-rw-r--r--firmware/drivers/lcd-2bit-vi.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/firmware/drivers/lcd-2bit-vi.c b/firmware/drivers/lcd-2bit-vi.c
index c464537185..d621951c78 100644
--- a/firmware/drivers/lcd-2bit-vi.c
+++ b/firmware/drivers/lcd-2bit-vi.c
@@ -383,33 +383,6 @@ void LCDFN(clear_display)(void)
383 LCDFN(scroll_info).lines = 0; 383 LCDFN(scroll_info).lines = 0;
384} 384}
385 385
386/* Clear the current viewport */
387void LCDFN(clear_viewport)(void)
388{
389 int lastmode;
390
391 if (CURRENT_VP == &default_vp &&
392 default_vp.buffer == &LCDFN(framebuffer_default))
393 {
394 LCDFN(clear_display)();
395 }
396 else
397 {
398 lastmode = CURRENT_VP->drawmode;
399
400 /* Invert the INVERSEVID bit and set basic mode to SOLID */
401 CURRENT_VP->drawmode = (~lastmode & DRMODE_INVERSEVID) |
402 DRMODE_SOLID;
403
404 LCDFN(fillrect)(0, 0, CURRENT_VP->width, CURRENT_VP->height);
405
406 CURRENT_VP->drawmode = lastmode;
407
408 LCDFN(scroll_stop_viewport)(CURRENT_VP);
409 }
410 CURRENT_VP->flags &= ~(VP_FLAG_VP_SET_CLEAN);
411}
412
413/* Draw a horizontal line (optimised) */ 386/* Draw a horizontal line (optimised) */
414void LCDFN(hline)(int x1, int x2, int y) 387void LCDFN(hline)(int x1, int x2, int y)
415{ 388{