diff options
author | 2019-02-25 14:53:28 -0800 | |
---|---|---|
committer | 2019-02-25 15:23:15 -0800 | |
commit | 7cbcc3710179fc47665a3e71d23661f1ee8b22f4 (patch) | |
tree | 5c8ff45c80733efe37997e2ee20ed93612b06ff8 /services/surfaceflinger/RegionSamplingThread.h | |
parent | 613e49e99e456df7a2b34ec820319855516c47cc (diff) |
SF: tidy comments for luma sampling.
Tidying of const, comment and one internal fn name for
Region Luma sampling.
Test: libgui_test --gtest_filter="RegionSamp*"
Change-Id: I46895c8ed5b2e2045d7ce7444085585b62b5ab6e
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.h')
-rw-r--r-- | services/surfaceflinger/RegionSamplingThread.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/services/surfaceflinger/RegionSamplingThread.h b/services/surfaceflinger/RegionSamplingThread.h index bf59007465..ab06513be3 100644 --- a/services/surfaceflinger/RegionSamplingThread.h +++ b/services/surfaceflinger/RegionSamplingThread.h @@ -38,11 +38,16 @@ public: explicit RegionSamplingThread(SurfaceFlinger& flinger); ~RegionSamplingThread(); + // Add a listener to receive luma notifications. The luma reported via listener will + // report the median luma for the layers under the stopLayerHandle, in the samplingArea region. void addListener(const Rect& samplingArea, const sp<IBinder>& stopLayerHandle, const sp<IRegionSamplingListener>& listener); + // Remove the listener to stop receiving median luma notifications. void removeListener(const sp<IRegionSamplingListener>& listener); + // Instruct the thread to perform a median luma sampling on the layers. void sampleNow(); +private: struct Descriptor { Rect area = Rect::EMPTY_RECT; wp<Layer> stopLayer; @@ -54,8 +59,10 @@ public: return std::hash<IBinder*>()(p.unsafe_get()); } }; + std::vector<float> sampleBuffer( + const sp<GraphicBuffer>& buffer, const Point& leftTop, + const std::vector<RegionSamplingThread::Descriptor>& descriptors); -private: void binderDied(const wp<IBinder>& who) override; void captureSample() REQUIRES(mMutex); |