diff options
| author | 2024-06-18 14:13:37 -0700 | |
|---|---|---|
| committer | 2024-06-18 14:13:37 -0700 | |
| commit | bb1814a0b94e8efb3fa3843c3d6a6533a382cac3 (patch) | |
| tree | 27e66123b9acee1a608b520afebbce3b6cd3c037 /services/surfaceflinger/TransactionCallbackInvoker.cpp | |
| parent | 13fde70bd413e24c6667ec8ad84ea0d9e07058d6 (diff) | |
| parent | 29f1274c966a27f929cf8d6f21a538d53a3f9ac3 (diff) | |
Merge 24Q3 (ab/11976889) to aosp-main-future
Bug: 347831320
Merged-In: I30f4c21dfee68603d0dad01d205f8a5581e6db31
Change-Id: I301c522ae67cc1f30fe0ddc819aa3dffd4c32d1a
Diffstat (limited to 'services/surfaceflinger/TransactionCallbackInvoker.cpp')
| -rw-r--r-- | services/surfaceflinger/TransactionCallbackInvoker.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/services/surfaceflinger/TransactionCallbackInvoker.cpp b/services/surfaceflinger/TransactionCallbackInvoker.cpp index 7b5298c82e..222ae30acb 100644 --- a/services/surfaceflinger/TransactionCallbackInvoker.cpp +++ b/services/surfaceflinger/TransactionCallbackInvoker.cpp @@ -30,6 +30,7 @@ #include <cinttypes> #include <binder/IInterface.h> +#include <common/FlagManager.h> #include <utils/RefBase.h> namespace android { @@ -128,9 +129,17 @@ status_t TransactionCallbackInvoker::addCallbackHandle(const sp<CallbackHandle>& sp<IBinder> surfaceControl = handle->surfaceControl.promote(); if (surfaceControl) { sp<Fence> prevFence = nullptr; - for (const auto& future : handle->previousReleaseFences) { - mergeFence(handle->name.c_str(), future.get().value_or(Fence::NO_FENCE), prevFence); + + if (FlagManager::getInstance().ce_fence_promise()) { + for (auto& future : handle->previousReleaseFences) { + mergeFence(handle->name.c_str(), future.get().value_or(Fence::NO_FENCE), prevFence); + } + } else { + for (const auto& future : handle->previousSharedReleaseFences) { + mergeFence(handle->name.c_str(), future.get().value_or(Fence::NO_FENCE), prevFence); + } } + handle->previousReleaseFence = prevFence; handle->previousReleaseFences.clear(); |