summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueue.cpp
diff options
context:
space:
mode:
author Jim Shargo <jshargo@google.com> 2024-12-17 15:24:53 -0800
committer Android (Google) Code Review <android-gerrit@google.com> 2024-12-17 15:24:53 -0800
commit10fcdbedee738fbe6677b5713f6656cb77848bb5 (patch)
tree82e179f6a13cf3c690f84bdbeaa6868dc58cba2c /libs/gui/BufferQueue.cpp
parent8703fd8436ed50c32c3bd11a5b8ecfc67d5eb820 (diff)
parent4f9c275b3f43c4f683b4778b3d3c5464d3dad9a0 (diff)
Merge changes I374aa204,I0df872b9 into main
* changes: libgui: Add unlimited slot support to Surfaces and Consumers libgui: Add support for unlimited slot BufferQueues
Diffstat (limited to 'libs/gui/BufferQueue.cpp')
-rw-r--r--libs/gui/BufferQueue.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/gui/BufferQueue.cpp b/libs/gui/BufferQueue.cpp
index b0f6e69115..f1374e23fd 100644
--- a/libs/gui/BufferQueue.cpp
+++ b/libs/gui/BufferQueue.cpp
@@ -108,6 +108,15 @@ void BufferQueue::ProxyConsumerListener::onSetFrameRate(float frameRate, int8_t
}
#endif
+#if COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_UNLIMITED_SLOTS)
+void BufferQueue::ProxyConsumerListener::onSlotCountChanged(int slotCount) {
+ sp<ConsumerListener> listener(mConsumerListener.promote());
+ if (listener != nullptr) {
+ listener->onSlotCountChanged(slotCount);
+ }
+}
+#endif
+
void BufferQueue::createBufferQueue(sp<IGraphicBufferProducer>* outProducer,
sp<IGraphicBufferConsumer>* outConsumer,
bool consumerIsSurfaceFlinger) {