From ed876a7175c54a68735e8bcacd1a22cbc84034ed Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 31 Jul 2018 21:32:50 -0700 Subject: minui: Use runtime properties instead of build time vars. This CL removes the use of the following build time macros, and uses the runtime property values instead. - TARGET_RECOVERY_PIXEL_FORMAT - TARGET_RECOVERY_OVERSCAN_PERCENT - TARGET_RECOVERY_DEFAULT_ROTATION Bug: 110380063 Test: Set up taimen with `TARGET_RECOVERY_DEFAULT_ROTATION := ROTATION_LEFT`. Build and check recovery UI. Test: Set up taimen with `TARGET_RECOVERY_PIXEL_FORMAT := ABGR_8888`. Build and check recovery UI. Change-Id: I4439556a03fde4805a18011ef72eff1373f31d47 --- minui/include/minui/minui.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'minui/include') diff --git a/minui/include/minui/minui.h b/minui/include/minui/minui.h index 97660d476..fa13ecdff 100644 --- a/minui/include/minui/minui.h +++ b/minui/include/minui/minui.h @@ -48,6 +48,13 @@ enum class GRRotation : int { LEFT = 3, }; +enum class PixelFormat : int { + UNKNOWN = 0, + ABGR = 1, + RGBX = 2, + BGRA = 3, +}; + // 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. @@ -85,6 +92,9 @@ unsigned int gr_get_height(const GRSurface* surface); // Sets rotation, flips gr_fb_width/height if 90 degree rotation difference void gr_rotate(GRRotation rotation); +// Returns the current PixelFormat being used. +PixelFormat gr_pixel_format(); + // // Input events. // -- cgit v1.2.3