diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-09-24 23:14:25 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-09-24 23:14:25 +0000 |
commit | c538a75aa36ae964f8e46a29c1657bf377fc525d (patch) | |
tree | 408e7cd6ec1c9661b15c6ea0ba314d06671bb1ee | |
parent | 4732904d5915901ce3ae4c6e5a81c3fac28f4bf2 (diff) | |
parent | 112da3a907c28fc1afb0c577d9711f7cc44ec329 (diff) | |
download | native-c538a75aa36ae964f8e46a29c1657bf377fc525d.tar.gz |
Snap for 6862191 from 112da3a907c28fc1afb0c577d9711f7cc44ec329 to rvc-qpr1-release
Change-Id: If2307a063cc1d43dd4381ea8bf6434463c598dc2
-rw-r--r-- | services/surfaceflinger/Layer.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp index 03903f6d07..3b9c7b77c7 100644 --- a/services/surfaceflinger/Layer.cpp +++ b/services/surfaceflinger/Layer.cpp @@ -1445,6 +1445,13 @@ Layer::FrameRate Layer::getFrameRateForLayerTree() const { void Layer::deferTransactionUntil_legacy(const sp<Layer>& barrierLayer, uint64_t frameNumber) { ATRACE_CALL(); + if (mLayerDetached) { + // If the layer is detached, then we don't defer this transaction since we will not + // commit the pending state while the layer is detached. Adding sync points may cause + // the barrier layer to wait for the states to be committed before dequeuing a buffer. + return; + } + mCurrentState.barrierLayer_legacy = barrierLayer; mCurrentState.frameNumber_legacy = frameNumber; // We don't set eTransactionNeeded, because just receiving a deferral |