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

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: fix stride confusion 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
« no previous file with comments | « lib/text/text.c ('k') | target/dartuinoP0/display/LS013B7DH06.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: platform/armemu/display.c
diff --git a/platform/armemu/display.c b/platform/armemu/display.c
index 72ecb7be077637e936605f26723125c01ad7bae0..0ab09bae94cd7d10cb6615e903a746f56805f9a5 100644
--- a/platform/armemu/display.c
+++ b/platform/armemu/display.c
@@ -28,6 +28,7 @@
#include <dev/display.h>
#include <lib/gfx.h>
#include <reg.h>
+#include <assert.h>
#define DRAW_TEST_PATTERN 0
@@ -53,17 +54,33 @@ void platform_init_display(void)
#endif
}
+status_t display_get_framebuffer(struct display_framebuffer *fb)
+{
+ DEBUG_ASSERT(fb);
+ if (!has_display())
+ return ERR_NOT_FOUND;
+
+ fb->image.format = IMAGE_FORMAT_RGB_x888;
+ fb->image.pixels = display_fb;
+ fb->image.width = display_w;
+ fb->image.height = display_h;
+ fb->image.stride = display_w;
+ fb->image.rowbytes = display_w * 4;
+ fb->flush = NULL;
+ fb->format = DISPLAY_FORMAT_RGB_x888;
+
+ return NO_ERROR;
+}
+
status_t display_get_info(struct display_info *info)
{
+ DEBUG_ASSERT(info);
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;
}
« no previous file with comments | « lib/text/text.c ('k') | target/dartuinoP0/display/LS013B7DH06.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698