summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.h
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2022-10-28 06:31:21 +0000
committer Vishnu Nair <vishnun@google.com> 2022-10-28 22:52:34 +0000
commit9d77a5cf9d05b87b547f139dedf50ccfbebb140e (patch)
tree78c2af43ec414e0a2e475acd29eb49ed2a23bb21 /services/surfaceflinger/RegionSamplingThread.h
parentbb26732f6fe79100bcf648461d9104a97967666f (diff)
SF: Use layer id for region sampling stop layer
Cleanup before layer refbase removal. We can lookup the stop layer by using a unique id. Bug: 238781169 Test: presubmit Change-Id: I33da6899adebc33c814656591f78187f08c53e80
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.h')
-rw-r--r--services/surfaceflinger/RegionSamplingThread.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/services/surfaceflinger/RegionSamplingThread.h b/services/surfaceflinger/RegionSamplingThread.h
index 686b4b1e1f..b62b15cb6d 100644
--- a/services/surfaceflinger/RegionSamplingThread.h
+++ b/services/surfaceflinger/RegionSamplingThread.h
@@ -26,6 +26,7 @@
#include <chrono>
#include <condition_variable>
+#include <cstdint>
#include <mutex>
#include <thread>
#include <unordered_map>
@@ -73,7 +74,7 @@ public:
// 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 wp<Layer>& stopLayer,
+ void addListener(const Rect& samplingArea, uint32_t stopLayerId,
const sp<IRegionSamplingListener>& listener);
// Remove the listener to stop receiving median luma notifications.
void removeListener(const sp<IRegionSamplingListener>& listener);
@@ -87,7 +88,7 @@ public:
private:
struct Descriptor {
Rect area = Rect::EMPTY_RECT;
- wp<Layer> stopLayer;
+ uint32_t stopLayerId;
sp<IRegionSamplingListener> listener;
};