summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-2bit-horz.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-horz.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-horz.c')
-rw-r--r--firmware/drivers/lcd-2bit-horz.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/firmware/drivers/lcd-2bit-horz.c b/firmware/drivers/lcd-2bit-horz.c
index 0ec9d2a6aa..b8ebaff7e1 100644
--- a/firmware/drivers/lcd-2bit-horz.c
+++ b/firmware/drivers/lcd-2bit-horz.c
@@ -348,33 +348,6 @@ void lcd_clear_display(void)
348 lcd_scroll_info.lines = 0; 348 lcd_scroll_info.lines = 0;
349} 349}
350 350
351/* Clear the current viewport */
352void lcd_clear_viewport(void)
353{
354 int lastmode;
355
356 if (lcd_current_viewport == &default_vp &&
357 default_vp.buffer == &lcd_framebuffer_default)
358 {
359 lcd_clear_display();
360 }
361 else
362 {
363 lastmode = lcd_current_viewport->drawmode;
364
365 /* Invert the INVERSEVID bit and set basic mode to SOLID */
366 lcd_current_viewport->drawmode = (~lastmode & DRMODE_INVERSEVID) |
367 DRMODE_SOLID;
368
369 lcd_fillrect(0, 0, lcd_current_viewport->width, lcd_current_viewport->height);
370
371 lcd_current_viewport->drawmode = lastmode;
372
373 lcd_scroll_stop_viewport(lcd_current_viewport);
374 }
375 lcd_current_viewport->flags &= ~(VP_FLAG_VP_SET_CLEAN);
376}
377
378/* Draw a horizontal line (optimised) */ 351/* Draw a horizontal line (optimised) */
379void lcd_hline(int x1, int x2, int y) 352void lcd_hline(int x1, int x2, int y)
380{ 353{