1
0
Fork 0
forked from len0rd/rockbox

Adapt OSD in plugin lib to be greylib compatible.

Requires addition of viewports and alternate framebuffers to greylib
which are essentially similar to the core implementation except that
the framebuffer can be any size and relationship to a viewport. Drawing
is always fully clipped to the intersecting area.

Adapt oscilloscope.c to the API change. FFT will use the new features
(later update).

Get rid of silly and wrong lcd_bmp_part use in OSD. Remove it from
plugin API (must be made incompatible now).

Change-Id: Iafa5e2174148fb8ad11db6b9d4add0dcabc5c563
This commit is contained in:
Michael Sevakis 2012-12-07 01:50:52 -05:00
parent f668c36241
commit 371c86bf3f
11 changed files with 1057 additions and 356 deletions

View file

@ -40,12 +40,13 @@
#define mylcd_(fn) pgfx_##fn
#define mylcd_ub_(fn) pgfx_##fn
#elif defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 8) && defined(__GREY_H__)
#elif defined (HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) && defined(__GREY_H__)
#define MYLCD_CFG_GREYLIB /* using greylib */
#define mylcd_(fn) grey_##fn
#define myxlcd_(fn) grey_##fn
#define mylcd_ub_(fn) grey_ub_##fn
#define myxlcd_ub_(fn) grey_ub_##fn
#define mylcd_viewport_(fn) grey_viewport_##fn
/* Common colors */
#define MYLCD_BLACK GREY_BLACK
@ -61,6 +62,7 @@
#define myxlcd_(fn) xlcd_##fn
#define mylcd_ub_(fn) rb->lcd_##fn
#define myxlcd_ub_(fn) xlcd_##fn
#define mylcd_viewport_(fn) rb->viewport_##fn
/* Common colors */
#define MYLCD_BLACK LCD_BLACK
@ -180,4 +182,11 @@ static inline void mylcd_ub_update_rect(int x, int y, int w, int h)
#define mylcd_ub_scroll_down myxlcd_ub_(scroll_down)
#endif /* HAVE_LCD_BITMAP */
/* Viewports */
#ifdef HAVE_LCD_BITMAP
#define mylcd_clear_viewport mylcd_(clear_viewport)
#define mylcd_set_viewport mylcd_(set_viewport)
#define mylcd_viewport_set_fullscreen mylcd_viewport_(set_fullscreen)
#endif /* HAVE_LCD_BITMAP */
#endif /* MYLCD_H */