From 2c71aa9feb0268da7d993feddbbe4db591fcd3ba Mon Sep 17 00:00:00 2001 From: Jonathan Gordon Date: Tue, 28 Feb 2012 22:26:32 +1100 Subject: 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 --- firmware/drivers/lcd-bitmap-common.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'firmware/drivers') diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c index f122e336d7..b0be687ed2 100644 --- a/firmware/drivers/lcd-bitmap-common.c +++ b/firmware/drivers/lcd-bitmap-common.c @@ -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 **/ -- cgit v1.2.3