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

Commit 69162d0b authored by Kevin DuBois's avatar Kevin DuBois
Browse files

SF: left/right flip luma calculation 90 deg rot

During 90 degree screenshots, the gles produced images were actually rotated 180,
whereas current code was written to accommodate flipped vertically only.
Flip coordinates during luma calc horizontally to match the correct region
the luma-listening client is expecting.

Test: manual testing of content with different left/right luma
Bug: 132394665
Change-Id: Ia3954cf97f57f5f563978f24391e66da23282d44
parent 0683fe79
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -280,6 +280,10 @@ float sampleArea(const uint32_t* data, int32_t width, int32_t height, int32_t st
        area.top = height - area.top;
        area.bottom = height - area.bottom;
        std::swap(area.top, area.bottom);

        area.left = width - area.left;
        area.right = width - area.right;
        std::swap(area.left, area.right);
    }

    std::array<int32_t, 256> brightnessBuckets = {};