summaryrefslogtreecommitdiffstats
path: root/firmware/target/hosted/sdl
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2014-06-18 07:15:00 +0200
committerThomas Martitz <kugel@rockbox.org>2014-06-21 00:15:53 +0200
commita1842c04f9cb73210d4cacde61a9e4b115050765 (patch)
treea37af61ef9285b763a42cd33797e2f3d634fbf9f /firmware/target/hosted/sdl
parent0250be1d6799db7b5ddc99cb33f31bf9cff01ed2 (diff)
downloadrockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.gz
rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.bz2
rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.zip
lcd-24bit: Introduce a 24-bit mid-level LCD driver
With LCD driver all calculation will be performed on RGB888 and the hardware/OS can display from our 24bit framebuffer. It is not yet as performance optimized as the existing drivers but should be good enough.The vast number of small changes is due to the fact that fb_data can be a struct type now, while most of the code expected a scalar type. lcd-as-memframe ASM code does not work with 24bit currently so the with 24bit it enforces the generic C code. All plugins are ported over. Except for rockpaint. It uses so much memory that it wouldnt fit into the 512k plugin buffer anymore (patches welcome). Change-Id: Ibb1964545028ce0d8ff9833ccc3ab66be3ee0754
Diffstat (limited to 'firmware/target/hosted/sdl')
-rw-r--r--firmware/target/hosted/sdl/lcd-bitmap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/firmware/target/hosted/sdl/lcd-bitmap.c b/firmware/target/hosted/sdl/lcd-bitmap.c
index 7e9bc297ef..5add2367a0 100644
--- a/firmware/target/hosted/sdl/lcd-bitmap.c
+++ b/firmware/target/hosted/sdl/lcd-bitmap.c
@@ -112,6 +112,8 @@ static unsigned long get_lcd_pixel(int x, int y)
#else
return *FBADDR(x, y);
#endif
+#elif LCD_DEPTH == 24
+ return FB_UNPACK_SCALAR_LCD(*FBADDR(x, y));
#endif
}
@@ -172,7 +174,7 @@ void sim_backlight(int value)
/* initialise simulator lcd driver */
void lcd_init_device(void)
{
-#if LCD_DEPTH == 16
+#if LCD_DEPTH >= 16
lcd_surface = SDL_CreateRGBSurface(SDL_SWSURFACE,
SIM_LCD_WIDTH * display_zoom,
SIM_LCD_HEIGHT * display_zoom,