diff options
author | 2024-07-24 15:16:19 +0000 | |
---|---|---|
committer | 2024-07-24 15:16:19 +0000 | |
commit | 6d8adec2ae565fd1e91fd22a66a2111cc3f5fcab (patch) | |
tree | 305ad6d7f6671efaa596ff9c987ef12527f86af6 /libs/gui/SurfaceComposerClient.cpp | |
parent | 1eb56992ebaa6ab91182035c7a05ac9abe07654b (diff) | |
parent | ac70bc579028cdc00a2f14b77718080b26b93c7d (diff) |
Merge "Optimize BLAST buffer releases via Unix sockets" into main
Diffstat (limited to 'libs/gui/SurfaceComposerClient.cpp')
-rw-r--r-- | libs/gui/SurfaceComposerClient.cpp | 16 |
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) { |