summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2015-07-13 08:14:39 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2015-07-20 07:11:21 +0200
commitcfec57d89808343bb6b043955e39411a0e29be5d (patch)
treedf172524d9d5bef3d15e8c461bf395e90d17f635 /include
parent772ab4f1722c5d166fe0677aa779e7b8628f0a79 (diff)
downloadbarebox-cfec57d89808343bb6b043955e39411a0e29be5d.tar.gz
barebox-cfec57d89808343bb6b043955e39411a0e29be5d.tar.xz
graphics_utils: Let fb_open allocate the screen
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>
Diffstat (limited to 'include')
-rw-r--r--include/gui/graphic_utils.h3
-rw-r--r--include/gui/gui.h2
2 files changed, 3 insertions, 2 deletions
diff --git a/include/gui/graphic_utils.h b/include/gui/graphic_utils.h
index 161f8d623c..ab8c3fcff3 100644
--- a/include/gui/graphic_utils.h
+++ b/include/gui/graphic_utils.h
@@ -19,7 +19,8 @@ void gu_set_pixel(struct fb_info *info, void *adr, u32 px);
void gu_set_rgb_pixel(struct fb_info *info, void *adr, u8 r, u8 g, u8 b);
void gu_set_rgba_pixel(struct fb_info *info, void *adr, u8 r, u8 g, u8 b, u8 a);
void gu_memset_pixel(struct fb_info *info, void* buf, u32 color, size_t size);
-int fb_open(const char * fbdev, struct screen *sc, bool offscreen);
+struct screen *fb_create_screen(struct fb_info *info, bool offscreen);
+struct screen *fb_open(const char *fbdev, bool offscreen);
void fb_close(struct screen *sc);
void gu_screen_blit(struct screen *sc);
void gu_invert_area(struct fb_info *info, void *buf, int startx, int starty, int width,
diff --git a/include/gui/gui.h b/include/gui/gui.h
index 59ff590b29..03e60aa0de 100644
--- a/include/gui/gui.h
+++ b/include/gui/gui.h
@@ -18,7 +18,7 @@ struct surface {
struct screen {
int fd;
- struct fb_info info;
+ struct fb_info *info;
struct surface s;