Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a5d50822 authored by Andriy Naborskyy's avatar Andriy Naborskyy
Browse files

Revert "Byte swap to support BGRA in recovery mode"

This reverts commit e5879c36.

The swap in page flip code is not needed any more.
New changes take care of ABGR and BGRA formats swapping bytes in
png and drawing routines

See commit fd778e3e

Bug: 26243152
Change-Id: I313ee41bee2c143b4e5412515285a65ac394ec77
parent cde72079
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -176,18 +176,6 @@ static GRSurface* fbdev_init(minui_backend* backend) {

static GRSurface* fbdev_flip(minui_backend* backend __unused) {
    if (double_buffered) {
#if defined(RECOVERY_BGRA)
        // In case of BGRA, do some byte swapping
        unsigned int idx;
        unsigned char tmp;
        unsigned char* ucfb_vaddr = (unsigned char*)gr_draw->data;
        for (idx = 0 ; idx < (gr_draw->height * gr_draw->row_bytes);
                idx += 4) {
            tmp = ucfb_vaddr[idx];
            ucfb_vaddr[idx    ] = ucfb_vaddr[idx + 2];
            ucfb_vaddr[idx + 2] = tmp;
        }
#endif
        // Change gr_draw to point to the buffer currently displayed,
        // then flip the driver so we're displaying the other buffer
        // instead.