From 9d77a5cf9d05b87b547f139dedf50ccfbebb140e Mon Sep 17 00:00:00 2001 From: Vishnu Nair Date: Fri, 28 Oct 2022 06:31:21 +0000 Subject: 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 --- services/surfaceflinger/RegionSamplingThread.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'services/surfaceflinger/RegionSamplingThread.h') 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 #include +#include #include #include #include @@ -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& stopLayer, + void addListener(const Rect& samplingArea, uint32_t stopLayerId, const sp& listener); // Remove the listener to stop receiving median luma notifications. void removeListener(const sp& listener); @@ -87,7 +88,7 @@ public: private: struct Descriptor { Rect area = Rect::EMPTY_RECT; - wp stopLayer; + uint32_t stopLayerId; sp listener; }; -- cgit v1.2.3-59-g8ed1b