lcd/skin_engine: Add the ability to draw onto the backdrop layer

The framebuffer the lcd driver uses can now be changed on the fly
which means that regular lcd_* drawing functions can draw onto the
"backdrop" buffer. The skin engine can use this to create layered
effects.

Add the tag %VB to a viewport to draw that viewport onto the
backdrop layer. If you want to draw an image onto the backdrop
framebuffer use %x(backdrop filename) instead of %X() inside
a viewport with %VB.

Change-Id: I741498e2af6d4f2d78932cabe8942317893e7cfc
This commit is contained in:
Jonathan Gordon 2012-02-28 22:26:32 +11:00
parent 13f98df5ed
commit 2c71aa9feb
13 changed files with 87 additions and 10 deletions

View file

@ -81,6 +81,14 @@ static void lcd_gradient_rect(int x1, int x2, int y, unsigned h,
}
#endif
void LCDFN(set_framebuffer)(FBFN(data) *fb)
{
if (fb)
LCDFN(framebuffer) = fb;
else
LCDFN(framebuffer) = &LCDFN(static_framebuffer)[0][0];
}
/*
* draws the borders of the current viewport
**/

View file

@ -132,6 +132,7 @@ void lcd_remote_init(void);
void lcd_remote_write_command(int cmd);
void lcd_remote_write_command_ex(int cmd, int data);
void lcd_remote_write_data(const fb_remote_data *data, int count);
extern void lcd_remote_set_framebuffer(fb_remote_data *fb);
extern void lcd_remote_bitmap_part(const fb_remote_data *src, int src_x,
int src_y, int stride, int x, int y,

View file

@ -529,6 +529,7 @@ extern void lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
int stride, int x, int y, int width, int height);
extern void lcd_bitmap(const fb_data *src, int x, int y, int width,
int height);
extern void lcd_set_framebuffer(fb_data *fb);
extern void lcd_scroll_step(int pixels);