diff options
author | 2022-11-01 17:32:15 +0000 | |
---|---|---|
committer | 2022-11-01 17:32:15 +0000 | |
commit | d500ef2e8a803528652fd1c002944cc001f52783 (patch) | |
tree | 8674baeb6f6c8206ce60b5081384e841d18e6e92 /services/surfaceflinger/SurfaceFlinger.cpp | |
parent | f968c0ce5345c0b54822eb5ddb0c93cb40203481 (diff) | |
parent | 9d77a5cf9d05b87b547f139dedf50ccfbebb140e (diff) |
Merge "SF: Use layer id for region sampling stop layer"
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r-- | services/surfaceflinger/SurfaceFlinger.cpp | 7 |
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; } |