diff options
| author | 2024-08-08 15:24:18 +0000 | |
|---|---|---|
| committer | 2024-08-08 15:24:18 +0000 | |
| commit | 2c5a7c4fd09dc104a3e1da2cd7bf82ee37ec2d21 (patch) | |
| tree | cc29bb81aa483d768d17fb606d680128383d5e87 /libs/gui/SurfaceComposerClient.cpp | |
| parent | 93787906d8210f4b9b7a30f12e0387d295a410c8 (diff) | |
| parent | f693bcf2ee13391f99b8ede5562047981e1f5968 (diff) | |
Merge "Add BufferReleaseChannel" 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 f663600f9e..b5d9366185 100644 --- a/libs/gui/SurfaceComposerClient.cpp +++ b/libs/gui/SurfaceComposerClient.cpp @@ -2390,6 +2390,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) { |