mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 21:37:44 +00:00
Merge "fix segmentation fault of GraphicsComposerAidlCommandTest" am: 9cf5a87265 am: 2a2ce43e66 am: b515796c3f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/2198035 Change-Id: I237edc25faf61897f40fd48bc87ea39bf3a0119a Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -488,10 +488,13 @@ bool VtsComposerClient::verifyComposerCallbackParams() {
|
||||
}
|
||||
|
||||
bool VtsComposerClient::destroyAllLayers() {
|
||||
for (const auto& it : mDisplayResources) {
|
||||
const auto& [display, resource] = it;
|
||||
std::unordered_map<int64_t, DisplayResource> physicalDisplays;
|
||||
while (!mDisplayResources.empty()) {
|
||||
const auto& it = mDisplayResources.begin();
|
||||
const auto& [display, resource] = *it;
|
||||
|
||||
for (auto layer : resource.layers) {
|
||||
while (!resource.layers.empty()) {
|
||||
auto layer = *resource.layers.begin();
|
||||
const auto status = destroyLayer(display, layer);
|
||||
if (!status.isOk()) {
|
||||
ALOGE("Unable to destroy all the layers, failed at layer %" PRId64 " with error %s",
|
||||
@@ -507,8 +510,12 @@ bool VtsComposerClient::destroyAllLayers() {
|
||||
status.getDescription().c_str());
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
auto extractIter = mDisplayResources.extract(it);
|
||||
physicalDisplays.insert(std::move(extractIter));
|
||||
}
|
||||
}
|
||||
mDisplayResources.swap(physicalDisplays);
|
||||
mDisplayResources.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user