diff options
| author | 2024-09-16 16:55:04 +0000 | |
|---|---|---|
| committer | 2024-11-21 04:26:26 +0000 | |
| commit | ea52d3c543d30354e9fe1cc351cf8f562e44f061 (patch) | |
| tree | 07c26741148c24e1b4e9b7e23676f34e379caa7e /libs/gui/BLASTBufferQueue.cpp | |
| parent | e03c39c8465b791a5b06c2575da77a2b151c4b02 (diff) | |
Add missing IProducerListener callbacks to BLASTBufferQueue
Add IProducerListener::onBufferDetached and
IProducerListener::onBufferAttached to BLASTBufferQueue.
Bug: 353202582
Flag: com.android.graphics.libgui.flags.bq_consumer_attach_callback
Test: build
(cherry picked from https://android-review.googlesource.com/q/commit:7c935090e839ec3391c6f94d46a2367e59a46056)
Merged-In: I53f25354804bd777ce20410edebe8e7d6a213061
Change-Id: I53f25354804bd777ce20410edebe8e7d6a213061
Diffstat (limited to 'libs/gui/BLASTBufferQueue.cpp')
| -rw-r--r-- | libs/gui/BLASTBufferQueue.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp index 739c3c2a41..044170c378 100644 --- a/libs/gui/BLASTBufferQueue.cpp +++ b/libs/gui/BLASTBufferQueue.cpp @@ -1096,6 +1096,17 @@ public: AsyncWorker::getInstance().post( [listener = mListener, slots = slots]() { listener->onBuffersDiscarded(slots); }); } + + void onBufferDetached(int slot) override { + AsyncWorker::getInstance().post( + [listener = mListener, slot = slot]() { listener->onBufferDetached(slot); }); + } + +#if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(BQ_CONSUMER_ATTACH_CALLBACK) + void onBufferAttached() override { + AsyncWorker::getInstance().post([listener = mListener]() { listener->onBufferAttached(); }); + } +#endif }; // Extends the BufferQueueProducer to create a wrapper around the listener so the listener calls |