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
diff --git a/services/surfaceflinger/RegionSamplingThread.cpp b/services/surfaceflinger/RegionSamplingThread.cpp
index 7fa33f5..66906e9 100644
--- a/services/surfaceflinger/RegionSamplingThread.cpp
+++ b/services/surfaceflinger/RegionSamplingThread.cpp
@@ -280,6 +280,10 @@
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 = {};