summaryrefslogtreecommitdiff
path: root/payloads/libpayload/include
diff options
context:
space:
mode:
authorDaisuke Nojiri <dnojiri@chromium.org>2015-09-24 12:42:17 -0700
committerPatrick Georgi <pgeorgi@google.com>2015-10-27 15:22:10 +0100
commitbed16d9706a72921435ad6df7171daf3f008337c (patch)
tree7db7da2f4ca9c46b9e1e3ea5aeb78294450810e4 /payloads/libpayload/include
parentfed269b1c44eb93c355fd0d6cb5ce619cd97d068 (diff)
downloadcoreboot-bed16d9706a72921435ad6df7171daf3f008337c.tar.xz
cbgfx: add load_bitmap
This change adds load_bitmap API, which loads a bitmap file from cbfs and returns a pointer to the image data. BUG=none BRANCH=tot TEST=Tested on Samus Change-Id: I7d7874f6f68c414dc877a012ad96c393e42dc35e Signed-off-by: Patrick Georgi <pgeorgi@google.com> Original-Commit-Id: 9d33e713a0cf6bd1365418dad989e47e86db01e4 Original-Change-Id: Idbf9682c2fa9df3f0bd296ca47edd02cd09cfd01 Original-Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Original-Reviewed-on: https://chromium-review.googlesource.com/302194 Original-Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: http://review.coreboot.org/11925 Tested-by: build bot (Jenkins)
Diffstat (limited to 'payloads/libpayload/include')
-rw-r--r--payloads/libpayload/include/cbgfx.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/payloads/libpayload/include/cbgfx.h b/payloads/libpayload/include/cbgfx.h
index 3c28a13cb4..cb037a0897 100644
--- a/payloads/libpayload/include/cbgfx.h
+++ b/payloads/libpayload/include/cbgfx.h
@@ -74,6 +74,18 @@ struct rgb_color {
*/
/*
+ * Load a bitmap file from cbfs
+ *
+ * Memory is allocated automatically and it's caller's responsibility to free it
+ *
+ * name: name of the bitmap file
+ * size: (OUT) size of the image
+ *
+ * return: pointer to the image data in memory or NULL on error
+ */
+void *load_bitmap(const char *name, size_t *size);
+
+/*
* draw a box filled with a color on screen
*
* box: .offset points the coordinate of the top left corner and .size specifies