diff options
| author | Thomas Martitz <kugel@rockbox.org> | 2014-06-18 07:15:00 +0200 |
|---|---|---|
| committer | Thomas Martitz <kugel@rockbox.org> | 2014-06-21 00:15:53 +0200 |
| commit | a1842c04f9cb73210d4cacde61a9e4b115050765 (patch) | |
| tree | a37af61ef9285b763a42cd33797e2f3d634fbf9f /apps/plugins/lib/xlcd_draw.c | |
| parent | 0250be1d6799db7b5ddc99cb33f31bf9cff01ed2 (diff) | |
| download | rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.zip rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.gz rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.bz2 rockbox-a1842c04f9cb73210d4cacde61a9e4b115050765.tar.xz | |
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/lib/xlcd_draw.c')
| -rw-r--r-- | apps/plugins/lib/xlcd_draw.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/apps/plugins/lib/xlcd_draw.c b/apps/plugins/lib/xlcd_draw.c index 3be1571..83ddf68 100644 --- a/apps/plugins/lib/xlcd_draw.c +++ b/apps/plugins/lib/xlcd_draw.c @@ -170,7 +170,7 @@ void xlcd_filltriangle_screen(struct screen* display, xlcd_filltriangle_vertical(display, x1, y1, x2, y2, x3, y3); } -#if LCD_DEPTH >= 8 +#if LCD_DEPTH >= 8 && LCD_DEPTH <= 16 #ifdef HAVE_LCD_COLOR static const fb_data graylut[256] = { @@ -244,6 +244,8 @@ static const fb_data graylut[256] = { }; #endif /* HAVE_LCD_COLOR */ +/* unused functions, enable when needed */ +#if 0 /* Draw a partial greyscale bitmap, canonical 8 bit format */ void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y, int stride, int x, int y, int width, int height) @@ -286,7 +288,13 @@ void xlcd_gray_bitmap_part(const unsigned char *src, int src_x, int src_y, #ifdef HAVE_LCD_COLOR do +#if LCD_DEPTH == 16 *dst_row++ = graylut[*src_row++]; +#else + /* untested change because this function is completely unused */ + *dst_row->r = *dst_row->g = *dst_row->b = *src_row++; + dst_row++; +#endif while (src_row < row_end); #endif @@ -302,6 +310,7 @@ void xlcd_gray_bitmap(const unsigned char *src, int x, int y, int width, { xlcd_gray_bitmap_part(src, 0, 0, width, x, y, width, height); } +#endif #ifdef HAVE_LCD_COLOR /* Draw a partial colour bitmap, canonical 24 bit RGB format */ @@ -379,4 +388,3 @@ void xlcd_color_bitmap(const unsigned char *src, int x, int y, int width, #endif /* LCD_DEPTH >= 8 */ #endif /* HAVE_LCD_BITMAP */ - |