SF: Cleanup Layer membership test
Rather than passing the individual data for the layer (stack id,
primaryOnly flag), pass the entire layer, and have the Output class look
for the right data.
This makes it easier to change the membership logic later if desired.
Test: atest libsurfaceflinger_unittest libcompositionengine_test
Test: go/wm-smoke
Bug: 121291683
Change-Id: Ieccb3986dd4f045b68329825a7e3e05734811cc0
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 4361a94..344c5e7 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -2773,7 +2773,7 @@
const auto& layerFEState = compositionLayer->getState().frontEnd;
// only consider the layers on the given layer stack
- if (!display->belongsInOutput(layerFEState.layerStackId, layerFEState.internalOnly)) {
+ if (!display->belongsInOutput(compositionLayer.get())) {
return;
}