summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2022-11-01 17:32:15 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2022-11-01 17:32:15 +0000
commitd500ef2e8a803528652fd1c002944cc001f52783 (patch)
tree8674baeb6f6c8206ce60b5081384e841d18e6e92 /services/surfaceflinger/SurfaceFlinger.cpp
parentf968c0ce5345c0b54822eb5ddb0c93cb40203481 (diff)
parent9d77a5cf9d05b87b547f139dedf50ccfbebb140e (diff)
Merge "SF: Use layer id for region sampling stop layer"
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 5bd7bb1563..23843ab11d 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1581,9 +1581,10 @@ status_t SurfaceFlinger::addRegionSamplingListener(const Rect& samplingArea,
// LayerHandle::getLayer promotes the layer object in a binder thread but we will not destroy
// the layer here since the caller has a strong ref to the layer's handle.
- // TODO (b/238781169): replace layer with layer id
- const wp<Layer> stopLayer = LayerHandle::getLayer(stopLayerHandle);
- mRegionSamplingThread->addListener(samplingArea, stopLayer, listener);
+ const sp<Layer> stopLayer = LayerHandle::getLayer(stopLayerHandle);
+ mRegionSamplingThread->addListener(samplingArea,
+ stopLayer ? stopLayer->getSequence() : UNASSIGNED_LAYER_ID,
+ listener);
return NO_ERROR;
}