summaryrefslogtreecommitdiffstats
path: root/minui/include/minui/minui.h
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2021-09-23 23:15:08 +0200
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-09-23 23:15:08 +0200
commit0bc337f6a1e1ef46406e10231b5bcf19915d799d (patch)
treee5b1c6eb69b8fa71e0330e464c3768109144bd0d /minui/include/minui/minui.h
parentMerge "Update OWNERS file" am: 7f8f3fcc33 am: 6011fcc875 am: fe131174ea (diff)
parentMerge "Add support to use preferred graphics backend" am: afab2aeb76 am: e53506a56f (diff)
downloadandroid_bootable_recovery-0bc337f6a1e1ef46406e10231b5bcf19915d799d.tar
android_bootable_recovery-0bc337f6a1e1ef46406e10231b5bcf19915d799d.tar.gz
android_bootable_recovery-0bc337f6a1e1ef46406e10231b5bcf19915d799d.tar.bz2
android_bootable_recovery-0bc337f6a1e1ef46406e10231b5bcf19915d799d.tar.lz
android_bootable_recovery-0bc337f6a1e1ef46406e10231b5bcf19915d799d.tar.xz
android_bootable_recovery-0bc337f6a1e1ef46406e10231b5bcf19915d799d.tar.zst
android_bootable_recovery-0bc337f6a1e1ef46406e10231b5bcf19915d799d.zip
Diffstat (limited to 'minui/include/minui/minui.h')
-rw-r--r--minui/include/minui/minui.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/minui/include/minui/minui.h b/minui/include/minui/minui.h
index 163e41dc6..5470457e7 100644
--- a/minui/include/minui/minui.h
+++ b/minui/include/minui/minui.h
@@ -104,10 +104,19 @@ enum class PixelFormat : int {
ARGB = 4,
};
-// Initializes the graphics backend and loads font file. Returns 0 on success, or -1 on error. Note
-// that the font initialization failure would be non-fatal, as caller may not need to draw any text
-// at all. Caller can check the font initialization result via gr_sys_font() as needed.
+enum class GraphicsBackend : int {
+ UNKNOWN = 0,
+ DRM = 1,
+ FBDEV = 2,
+};
+
+// Initializes the default graphics backend and loads font file. Returns 0 on success, or -1 on
+// error. Note that the font initialization failure would be non-fatal, as caller may not need to
+// draw any text at all. Caller can check the font initialization result via gr_sys_font() as
+// needed.
int gr_init();
+// Supports backend selection for minui client.
+int gr_init(std::initializer_list<GraphicsBackend> backends);
// Frees the allocated resources. The function is idempotent, and safe to be called if gr_init()
// didn't finish successfully.