summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2021-10-18 09:36:33 -0700
committer Vishnu Nair <vishnun@google.com> 2021-11-04 22:32:51 +0000
commitda1fd1508c914c7f0849e4e00a5fae5412433337 (patch)
tree6acc5a1bebfb8d144a954e3b0b4d8a4c06aa537f /services/surfaceflinger/Layer.cpp
parentcd52e2db6c57326c1380cd53e9520adc7faf5ec9 (diff)
SurfaceFlinger: Emit callbacks for non-buffer layer transactions
Ensure we emit callbacks if the transaction contains only non-buffer layer state changes. Test: atest SurfaceFlinger_test Fixes: 205183085 Change-Id: I56bf0dcaff4312628fe2cd1d0b93db520518ec54
Diffstat (limited to 'services/surfaceflinger/Layer.cpp')
-rw-r--r--services/surfaceflinger/Layer.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/services/surfaceflinger/Layer.cpp b/services/surfaceflinger/Layer.cpp
index d68cf9720f..d8854d3033 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2645,6 +2645,17 @@ bool Layer::setDropInputMode(gui::DropInputMode mode) {
return true;
}
+bool Layer::setTransactionCompletedListeners(
+ const std::vector<ListenerCallbacks>& listenerCallbacks, const sp<IBinder>&) {
+ if (listenerCallbacks.empty()) {
+ return false;
+ }
+ for (auto& listener : listenerCallbacks) {
+ mFlinger->getTransactionCallbackInvoker().addEmptyCallback(listener);
+ }
+ return false;
+}
+
// ---------------------------------------------------------------------------
std::ostream& operator<<(std::ostream& stream, const Layer::FrameRate& rate) {