summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuihong Luo <huisinro@google.com>2023-04-25 20:40:52 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-05-09 04:04:29 +0000
commit4d0345c4e9a2cd3be4dc1b5514a628dd92862904 (patch)
treeedf2de47c7e69bd784c69073768eec95c0142b0e
parent2ebf53077bda42c602cc7a0027f5c2315541b9b7 (diff)
downloadnative-4d0345c4e9a2cd3be4dc1b5514a628dd92862904.tar.gz
Add pending command buffer reset
when error occurs, so it won't affect the upcoming commands. Bug: 273525126 Test: manual (cherry picked from https://googleplex-android-review.googlesource.com/q/commit:3fd3acc99b20cd29837053716086eca8406cd3b0) Merged-In: I08f938764dda78e6a85e625ae6767816582f5312 Change-Id: I08f938764dda78e6a85e625ae6767816582f5312
-rw-r--r--services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
index 79dcd159d3..fb5f0cb30f 100644
--- a/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
+++ b/services/surfaceflinger/DisplayHardware/AidlComposerHal.cpp
@@ -765,6 +765,7 @@ Error AidlComposer::execute() {
auto status = mAidlComposerClient->executeCommands(commands, &results);
if (!status.isOk()) {
ALOGE("executeCommands failed %s", status.getDescription().c_str());
+ mWriter.reset();
return static_cast<Error>(status.getServiceSpecificError());
}
@@ -776,6 +777,7 @@ Error AidlComposer::execute() {
const auto index = static_cast<size_t>(cmdErr.commandIndex);
if (index < 0 || index >= commands.size()) {
ALOGE("invalid command index %zu", index);
+ mWriter.reset();
return Error::BAD_PARAMETER;
}