SF: Use getVisibleLayers... in doComposeSurfaces
in b/114101122, it is discovered that there is a problem
in indexing the SF mCompositionInfo by displayId because
there are multiple displays that have the same id (-1).
This change uses getVisibleLayersSortedByZ in doComposeSurfaces
until we can fix the indexing of mCompositionInfo.
Bug: 114101122
Test: run cts -m CtsViewTestCases, CtsMediaTestCases
Change-Id: I90adb957c183400c396f25fa9583b668e1da8417
diff --git a/services/surfaceflinger/DisplayHardware/HWComposer.cpp b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
index d963ab6..6b56ca4 100644
--- a/services/surfaceflinger/DisplayHardware/HWComposer.cpp
+++ b/services/surfaceflinger/DisplayHardware/HWComposer.cpp
@@ -500,6 +500,8 @@
validateChange(compositionInfo.compositionType,
changedTypes[&*hwcLayer]);
compositionInfo.compositionType = changedTypes[&*hwcLayer];
+ compositionInfo.layer->mLayer->setCompositionType(displayId,
+ compositionInfo.compositionType, false);
}
switch (compositionInfo.compositionType) {
@@ -520,6 +522,7 @@
layerRequests[&*hwcLayer] ==
HWC2::LayerRequest::ClearClientTarget) {
compositionInfo.hwc.clearClientTarget = true;
+ compositionInfo.layer->mLayer->setClearClientTarget(displayId, true);
} else {
if (layerRequests.count(&*hwcLayer) != 0) {
LOG_DISPLAY_ERROR(displayId,
@@ -527,6 +530,7 @@
.c_str());
}
compositionInfo.hwc.clearClientTarget = false;
+ compositionInfo.layer->mLayer->setClearClientTarget(displayId, false);
}
}