[display] Refactor to avoid implicit framebuffer allocation.

Preparation to allow other images to be presented to the display.
Separate definitions of display and image formats.
display_get_info no longer provides a framebuffer.
display_get_framebuffer allocates a framebuffer for convenience.

Review URL: https://codereview.chromium.org/1777783003 .
This commit is contained in:
cstout
2016-03-10 09:49:22 -08:00
parent e290cb1b8b
commit c1255f7f47
16 changed files with 333 additions and 172 deletions

View File

@@ -76,12 +76,12 @@ void text_draw(int x, int y, const char *string)
*/
void text_update(void)
{
struct display_info info;
if (display_get_info(&info) < 0)
struct display_framebuffer fb;
if (display_get_framebuffer(&fb) < 0)
return;
/* get the display's surface */
gfx_surface *surface = gfx_create_surface_from_display(&info);
gfx_surface *surface = gfx_create_surface_from_display(&fb);
struct text_line *line;
list_for_every_entry(&text_list, line, struct text_line, node) {