mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
lcd: Move grayscale clear_viewport() to lcd-bitmap-common.c
All grayscale LCDs have the same clear_viewport() implementation. Change-Id: I087ac3be824c97a1f42857b4e2fedb0675d453fa
This commit is contained in:
parent
f737e5025d
commit
44b9785465
5 changed files with 28 additions and 109 deletions
|
|
@ -206,34 +206,6 @@ void LCDFN(clear_display)(void)
|
|||
LCDFN(scroll_info).lines = 0;
|
||||
}
|
||||
|
||||
/* Clear the current viewport */
|
||||
void LCDFN(clear_viewport)(void)
|
||||
{
|
||||
int oldmode;
|
||||
|
||||
if (CURRENT_VP == &default_vp &&
|
||||
default_vp.buffer == &LCDFN(framebuffer_default))
|
||||
{
|
||||
LCDFN(clear_display)();
|
||||
}
|
||||
else
|
||||
{
|
||||
oldmode = CURRENT_VP->drawmode;
|
||||
|
||||
/* Invert the INVERSEVID bit and set basic mode to SOLID */
|
||||
CURRENT_VP->drawmode = (~CURRENT_VP->drawmode & DRMODE_INVERSEVID) |
|
||||
DRMODE_SOLID;
|
||||
|
||||
LCDFN(fillrect)(0, 0, CURRENT_VP->width, CURRENT_VP->height);
|
||||
|
||||
CURRENT_VP->drawmode = oldmode;
|
||||
|
||||
LCDFN(scroll_stop_viewport)(CURRENT_VP);
|
||||
}
|
||||
|
||||
CURRENT_VP->flags &= ~(VP_FLAG_VP_SET_CLEAN);
|
||||
}
|
||||
|
||||
/* Draw a horizontal line (optimised) */
|
||||
void LCDFN(hline)(int x1, int x2, int y)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue