Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2983)

Unified Diff: platform/armemu/display.c

Issue 1777783003: [display] Refactor to avoid implicit framebuffer allocation. (Closed) Base URL: https://github.com/littlekernel/lk.git@master
Patch Set: update other targets Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: platform/armemu/display.c
diff --git a/platform/armemu/display.c b/platform/armemu/display.c
index 72ecb7be077637e936605f26723125c01ad7bae0..124afb59475bfa94673251e73c3311a88c0c50e0 100644
--- a/platform/armemu/display.c
+++ b/platform/armemu/display.c
@@ -53,17 +53,30 @@ void platform_init_display(void)
#endif
}
+status_t display_get_framebuffer(struct display_framebuffer *fb)
+{
gkalsi 2016/03/09 21:13:37 DEBUG_ASSERT(fb)
cdotstout 2016/03/09 22:48:00 Done.
+ if (!has_display())
+ return ERR_NOT_FOUND;
+
+ fb->format = DISPLAY_FORMAT_RGB_x888;
+ fb->flush = NULL;
+ fb->image.format = IMAGE_FORMAT_RGB_x888;
+ fb->image.pixels = display_fb;
+ fb->image.width = display_w;
+ fb->image.height = display_h;
+ fb->image.rowbytes = display_w;
+
+ return NO_ERROR;
+}
+
status_t display_get_info(struct display_info *info)
{
gkalsi 2016/03/09 21:13:37 DEBUG_ASSERT(info)
cdotstout 2016/03/09 22:48:00 Done.
if (!has_display())
return ERR_NOT_FOUND;
- info->framebuffer = display_fb;
- info->format = GFX_FORMAT_RGB_x888;
+ info->format = DISPLAY_FORMAT_RGB_x888;
info->width = display_w;
info->height = display_h;
- info->stride = display_w;
- info->flush = NULL;
return NO_ERROR;
}

Powered by Google App Engine
This is Rietveld 408576698