summaryrefslogtreecommitdiff
path: root/libs/gui/SurfaceComposerClient.cpp
diff options
context:
space:
mode:
author Patrick Williams <pdwilliams@google.com> 2024-07-24 15:16:19 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-07-24 15:16:19 +0000
commit6d8adec2ae565fd1e91fd22a66a2111cc3f5fcab (patch)
tree305ad6d7f6671efaa596ff9c987ef12527f86af6 /libs/gui/SurfaceComposerClient.cpp
parent1eb56992ebaa6ab91182035c7a05ac9abe07654b (diff)
parentac70bc579028cdc00a2f14b77718080b26b93c7d (diff)
Merge "Optimize BLAST buffer releases via Unix sockets" into main
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r--libs/gui/SurfaceComposerClient.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/libs/gui/SurfaceComposerClient.cpp b/libs/gui/SurfaceComposerClient.cpp
index 2821b510c3..5c87772587 100644
--- a/libs/gui/SurfaceComposerClient.cpp
+++ b/libs/gui/SurfaceComposerClient.cpp
@@ -2394,6 +2394,22 @@ SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setDropI
return *this;
}
+SurfaceComposerClient::Transaction& SurfaceComposerClient::Transaction::setBufferReleaseChannel(
+ const sp<SurfaceControl>& sc,
+ const std::shared_ptr<gui::BufferReleaseChannel::ProducerEndpoint>& channel) {
+ layer_state_t* s = getLayerState(sc);
+ if (!s) {
+ mStatus = BAD_INDEX;
+ return *this;
+ }
+
+ s->what |= layer_state_t::eBufferReleaseChannelChanged;
+ s->bufferReleaseChannel = channel;
+
+ registerSurfaceControlForCallback(sc);
+ return *this;
+}
+
// ---------------------------------------------------------------------------
DisplayState& SurfaceComposerClient::Transaction::getDisplayState(const sp<IBinder>& token) {