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-04 03:02:03 +0000
commit6061a3b8f56e0d81cb58762afb7de9f2384b38ce (patch)
treeedf2de47c7e69bd784c69073768eec95c0142b0e
parente9a5e9e57380e38283571eb3bb75db941a44b378 (diff)
downloadnative-6061a3b8f56e0d81cb58762afb7de9f2384b38ce.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;
}