diff options
author | Chia-I Wu | 2017-09-08 17:31:32 -0500 |
---|---|---|
committer | Android (Google) Code Review | 2017-09-08 17:31:32 -0500 |
commit | f7e10c82b04e0f6a2a445609144612ac2f47c8a8 (patch) | |
tree | d6e3121690ddf13d41269ce2c74be8202af1dd39 | |
parent | 9db7166d7cf1ef4b9b1a0a997fada57318851e74 (diff) | |
parent | c0b2b0c457c45e09479029748e07e6d1b1c9d457 (diff) | |
download | frameworks-native-f7e10c82b04e0f6a2a445609144612ac2f47c8a8.tar.gz frameworks-native-f7e10c82b04e0f6a2a445609144612ac2f47c8a8.tar.xz frameworks-native-f7e10c82b04e0f6a2a445609144612ac2f47c8a8.zip |
Merge "surfaceflinger: handle executeCommands transaction errors" into oc-mr1-dev
-rw-r--r-- | services/surfaceflinger/DisplayHardware/ComposerHal.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/services/surfaceflinger/DisplayHardware/ComposerHal.cpp b/services/surfaceflinger/DisplayHardware/ComposerHal.cpp index ac739a2a0..cf01ad0d6 100644 --- a/services/surfaceflinger/DisplayHardware/ComposerHal.cpp +++ b/services/surfaceflinger/DisplayHardware/ComposerHal.cpp | |||
@@ -755,7 +755,7 @@ Error Composer::execute() | |||
755 | } | 755 | } |
756 | 756 | ||
757 | Error error = kDefaultError; | 757 | Error error = kDefaultError; |
758 | mClient->executeCommands(commandLength, commandHandles, | 758 | auto ret = mClient->executeCommands(commandLength, commandHandles, |
759 | [&](const auto& tmpError, const auto& tmpOutChanged, | 759 | [&](const auto& tmpError, const auto& tmpOutChanged, |
760 | const auto& tmpOutLength, const auto& tmpOutHandles) | 760 | const auto& tmpOutLength, const auto& tmpOutHandles) |
761 | { | 761 | { |
@@ -788,6 +788,11 @@ Error Composer::execute() | |||
788 | error = Error::NO_RESOURCES; | 788 | error = Error::NO_RESOURCES; |
789 | } | 789 | } |
790 | }); | 790 | }); |
791 | // executeCommands can fail because of out-of-fd and we do not want to | ||
792 | // abort() in that case | ||
793 | if (!ret.isOk()) { | ||
794 | ALOGE("executeCommands failed because of %s", ret.description().c_str()); | ||
795 | } | ||
791 | 796 | ||
792 | if (error == Error::NONE) { | 797 | if (error == Error::NONE) { |
793 | std::vector<CommandReader::CommandError> commandErrors = | 798 | std::vector<CommandReader::CommandError> commandErrors = |