So far we only supported blitting the whole screen from the shadow
fb to the framebuffer. Add a function to blit areas.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
The fb core now has builtin support for offscreen rendering, use
this and drop offscreen handling in the gui code.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Allocate the screen dynamically in fb_open. This opens the way to create
a fb_create_screen function which takes a struct fb_info * instead of a
filename. This is suitable for the framebuffer console which already has
a struct fb_info *.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
get_pixel converts a 32bit trgb color into framebuffer format. This
is useful for other code aswell, so export it.
Other functions in the graphics utils code use the name get/set_pixel
aswell, but instead of converting data they get a pixel from the framebuffer
or set a pixel on the framebuffer. To separate from these rename the
function to gu_hex_to_pixel.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Do not blit the surface everytime we write an image
As we want to able to render multiple image this will cause 1 blit per image;
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
To open, memmap, get the fb_info and if needed allocate the offscreen buffer
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Instead of passing hundreds of parameter, just pass the right structure.
struct screen represent the screen with a without double buffering.
struct surface represent the part of the screen we want to render.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This is needed if the image is bigger than the screen.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>