diff options
author | 2019-05-21 08:34:09 -0700 | |
---|---|---|
committer | 2019-05-29 13:51:28 -0700 | |
commit | b325c93b5ef70c3392dbde815b9867b01ab997f8 (patch) | |
tree | 185d701fab0c74537761174c2cb20dadca6a65cc /services/surfaceflinger/RegionSamplingThread.h | |
parent | 030764d25fc52a8ba5a534feccd84168b60e8182 (diff) |
SF: adapt region sampling to display orientation
Pass in the orientation flags of SF to RenderEngine when conducting the
sampling composition. This resulted mis-sampled areas, especially when
the region was outside of the clip of the 0-degree rotated display.
Bug: 132394665
Test: manual verification with 90, 270, 0 rotations
Test: new tests in libsurfaceflinger_unittest#RegionSamplingTest.*
Change-Id: I2869ef191572dbcc9170df8d3ed17414ab053ca4
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.h')
-rw-r--r-- | services/surfaceflinger/RegionSamplingThread.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/RegionSamplingThread.h b/services/surfaceflinger/RegionSamplingThread.h index 08134e6acd..3c6fcf3872 100644 --- a/services/surfaceflinger/RegionSamplingThread.h +++ b/services/surfaceflinger/RegionSamplingThread.h @@ -37,7 +37,8 @@ class Scheduler; class SurfaceFlinger; struct SamplingOffsetCallback; -float sampleArea(const uint32_t* data, int32_t stride, const Rect& area); +float sampleArea(const uint32_t* data, int32_t width, int32_t height, int32_t stride, + uint32_t orientation, const Rect& area); class RegionSamplingThread : public IBinder::DeathRecipient { public: @@ -94,7 +95,7 @@ private: }; std::vector<float> sampleBuffer( const sp<GraphicBuffer>& buffer, const Point& leftTop, - const std::vector<RegionSamplingThread::Descriptor>& descriptors); + const std::vector<RegionSamplingThread::Descriptor>& descriptors, uint32_t orientation); void doSample(); void binderDied(const wp<IBinder>& who) override; |