summaryrefslogtreecommitdiffstats
path: root/minuitwrp/graphics_fbdev.cpp
diff options
context:
space:
mode:
authorVladimir Oltean <olteanv@gmail.com>2018-07-02 23:04:03 +0200
committerEthan Yonker <dees_troy@teamw.in>2019-03-18 17:39:38 +0100
commitd32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5 (patch)
treeb61769e4756a3500a7ccc1fe9399b7de0af4d47c /minuitwrp/graphics_fbdev.cpp
parentAB/Non AB Devices: updates for moving cache (diff)
downloadandroid_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.gz
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.bz2
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.lz
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.xz
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.tar.zst
android_bootable_recovery-d32b7ebf20217f5053aaf0597cc1a7dcf86fc2a5.zip
Diffstat (limited to 'minuitwrp/graphics_fbdev.cpp')
-rw-r--r--minuitwrp/graphics_fbdev.cpp27
1 files changed, 0 insertions, 27 deletions
diff --git a/minuitwrp/graphics_fbdev.cpp b/minuitwrp/graphics_fbdev.cpp
index 8cf85f5eb..fc5fcf385 100644
--- a/minuitwrp/graphics_fbdev.cpp
+++ b/minuitwrp/graphics_fbdev.cpp
@@ -293,7 +293,6 @@ static GRSurface* fbdev_flip(minui_backend* backend __unused) {
ucfb_vaddr[idx + 2] = tmp;
}
#endif
-#ifndef BOARD_HAS_FLIPPED_SCREEN
if (double_buffered) {
// Copy from the in-memory surface to the framebuffer.
memcpy(gr_framebuffer[1-displayed_buffer].data, gr_draw->data,
@@ -304,32 +303,6 @@ static GRSurface* fbdev_flip(minui_backend* backend __unused) {
memcpy(gr_framebuffer[0].data, gr_draw->data,
gr_draw->height * gr_draw->row_bytes);
}
-#else
- int gr_active_fb = 0;
- if (double_buffered)
- gr_active_fb = 1-displayed_buffer;
-
- /* flip buffer 180 degrees for devices with physically inverted screens */
- unsigned int row_pixels = gr_draw->row_bytes / gr_framebuffer[0].pixel_bytes;
- if (gr_framebuffer[0].pixel_bytes == 4) {
- for (unsigned int y = 0; y < gr_draw->height; ++y) {
- uint32_t* dst = reinterpret_cast<uint32_t*>(gr_framebuffer[gr_active_fb].data) + y * row_pixels;
- uint32_t* src = reinterpret_cast<uint32_t*>(gr_draw->data) + (gr_draw->height - y - 1) * row_pixels + gr_draw->width;
- for (unsigned int x = 0; x < gr_draw->width; ++x)
- *(dst++) = *(--src);
- }
- } else {
- for (unsigned int y = 0; y < gr_draw->height; ++y) {
- uint16_t* dst = reinterpret_cast<uint16_t*>(gr_framebuffer[gr_active_fb].data) + y * row_pixels;
- uint16_t* src = reinterpret_cast<uint16_t*>(gr_draw->data) + (gr_draw->height - y - 1) * row_pixels + gr_draw->width;
- for (unsigned int x = 0; x < gr_draw->width; ++x)
- *(dst++) = *(--src);
- }
- }
-
- if (double_buffered)
- set_displayed_framebuffer(1-displayed_buffer);
-#endif
return gr_draw;
}