summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/Layer.cpp
diff options
context:
space:
mode:
author Vishnu Nair <vishnun@google.com> 2021-11-05 18:08:11 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2021-11-05 18:08:11 +0000
commit040744c6d6ac0a7efea8c4d66813803669c34e83 (patch)
tree6a07ab3c229b8c2edcfd03e4f2bd712c80b86ff9 /services/surfaceflinger/Layer.cpp
parentd209221a38e6ffa9e026f7f27731ec7c9e24ddf9 (diff)
parentda1fd1508c914c7f0849e4e00a5fae5412433337 (diff)
Merge "SurfaceFlinger: Emit callbacks for non-buffer layer transactions"
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 a27c487822..d85e843d83 100644
--- a/services/surfaceflinger/Layer.cpp
+++ b/services/surfaceflinger/Layer.cpp
@@ -2640,6 +2640,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) {