summaryrefslogtreecommitdiffstats
path: root/minui
diff options
context:
space:
mode:
authorDoug Zongker <dougz@android.com>2014-05-14 00:24:06 +0200
committerAndroid Git Automerger <android-git-automerger@android.com>2014-05-14 00:24:06 +0200
commiteed64836386a64cc945e7e9a01a96ed0d6fa57af (patch)
tree220d9553331bd075af366c83ada77a8320f804eb /minui
parentam 48abd574: am 34ff5fe3: am 74b90b30: Merge "screen_ui: Initialize text buffer" (diff)
parentam d2fb4ed5: am d27aa76a: Merge "Support BGRA framebuffer" (diff)
downloadandroid_bootable_recovery-eed64836386a64cc945e7e9a01a96ed0d6fa57af.tar
android_bootable_recovery-eed64836386a64cc945e7e9a01a96ed0d6fa57af.tar.gz
android_bootable_recovery-eed64836386a64cc945e7e9a01a96ed0d6fa57af.tar.bz2
android_bootable_recovery-eed64836386a64cc945e7e9a01a96ed0d6fa57af.tar.lz
android_bootable_recovery-eed64836386a64cc945e7e9a01a96ed0d6fa57af.tar.xz
android_bootable_recovery-eed64836386a64cc945e7e9a01a96ed0d6fa57af.tar.zst
android_bootable_recovery-eed64836386a64cc945e7e9a01a96ed0d6fa57af.zip
Diffstat (limited to 'minui')
-rw-r--r--minui/graphics_fbdev.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/minui/graphics_fbdev.c b/minui/graphics_fbdev.c
index bb91975a9..a91ea8726 100644
--- a/minui/graphics_fbdev.c
+++ b/minui/graphics_fbdev.c
@@ -184,8 +184,21 @@ static gr_surface fbdev_flip(minui_backend* backend __unused) {
set_displayed_framebuffer(1-displayed_buffer);
} else {
// Copy from the in-memory surface to the framebuffer.
+
+#if defined(RECOVERY_BGRA)
+ unsigned int idx;
+ unsigned char* ucfb_vaddr = (unsigned char*)gr_framebuffer[0].data;
+ unsigned char* ucbuffer_vaddr = (unsigned char*)gr_draw->data;
+ for (idx = 0 ; idx < (gr_draw->height * gr_draw->row_bytes); idx += 4) {
+ ucfb_vaddr[idx ] = ucbuffer_vaddr[idx + 2];
+ ucfb_vaddr[idx + 1] = ucbuffer_vaddr[idx + 1];
+ ucfb_vaddr[idx + 2] = ucbuffer_vaddr[idx ];
+ ucfb_vaddr[idx + 3] = ucbuffer_vaddr[idx + 3];
+ }
+#else
memcpy(gr_framebuffer[0].data, gr_draw->data,
gr_draw->height * gr_draw->row_bytes);
+#endif
}
return gr_draw;
}