summaryrefslogtreecommitdiff
path: root/apps/plugins/logo.c
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 /apps/plugins/logo.c
parent0250be1d6799db7b5ddc99cb33f31bf9cff01ed2 (diff)
downloadrockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.gz
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 'apps/plugins/logo.c')
-rw-r--r--apps/plugins/logo.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/plugins/logo.c b/apps/plugins/logo.c
index aae9e54562..a7257fae4b 100644
--- a/apps/plugins/logo.c
+++ b/apps/plugins/logo.c
@@ -42,14 +42,12 @@ static const struct button_mapping *plugin_contexts[]
42#define REMOTE_LOGO_WIDTH BMPWIDTH_remote_rockboxlogo 42#define REMOTE_LOGO_WIDTH BMPWIDTH_remote_rockboxlogo
43#define REMOTE_LOGO_HEIGHT BMPHEIGHT_remote_rockboxlogo 43#define REMOTE_LOGO_HEIGHT BMPHEIGHT_remote_rockboxlogo
44#define REMOTE_LOGO remote_rockboxlogo 44#define REMOTE_LOGO remote_rockboxlogo
45extern const fb_remote_data remote_rockboxlogo[];
46#endif /* HAVE_REMOTE_LCD */ 45#endif /* HAVE_REMOTE_LCD */
47 46
48#define LOGO rockboxlogo 47#define LOGO rockboxlogo
49#include "pluginbitmaps/rockboxlogo.h" 48#include "pluginbitmaps/rockboxlogo.h"
50#define LOGO_WIDTH BMPWIDTH_rockboxlogo 49#define LOGO_WIDTH BMPWIDTH_rockboxlogo
51#define LOGO_HEIGHT BMPHEIGHT_rockboxlogo 50#define LOGO_HEIGHT BMPHEIGHT_rockboxlogo
52extern const fb_data rockboxlogo[];
53 51
54#else /* !LCD_BITMAP */ 52#else /* !LCD_BITMAP */
55#define DISPLAY_WIDTH 55 53#define DISPLAY_WIDTH 55
@@ -103,10 +101,10 @@ enum plugin_status plugin_start(const void* parameter) {
103 while (1) { 101 while (1) {
104#ifdef HAVE_LCD_BITMAP 102#ifdef HAVE_LCD_BITMAP
105 rb->lcd_clear_display(); 103 rb->lcd_clear_display();
106 rb->lcd_bitmap(LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT); 104 rb->lcd_bitmap((const fb_data*)LOGO, x, y, LOGO_WIDTH, LOGO_HEIGHT);
107#ifdef REMOTE_LOGO 105#ifdef REMOTE_LOGO
108 rb->lcd_remote_clear_display(); 106 rb->lcd_remote_clear_display();
109 rb->lcd_remote_bitmap(REMOTE_LOGO, 107 rb->lcd_remote_bitmap((const fb_data*)REMOTE_LOGO,
110 (x * (REMOTE_WIDTH - REMOTE_LOGO_WIDTH)) / (DISPLAY_WIDTH - LOGO_WIDTH), 108 (x * (REMOTE_WIDTH - REMOTE_LOGO_WIDTH)) / (DISPLAY_WIDTH - LOGO_WIDTH),
111 (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT), 109 (y * (REMOTE_HEIGHT - REMOTE_LOGO_HEIGHT)) / (DISPLAY_HEIGHT - LOGO_HEIGHT),
112 REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT); 110 REMOTE_LOGO_WIDTH, REMOTE_LOGO_HEIGHT);
@@ -195,5 +193,3 @@ enum plugin_status plugin_start(const void* parameter) {
195 } 193 }
196 } 194 }
197} 195}
198
199