summaryrefslogtreecommitdiff
path: root/libs/gui/IGraphicBufferProducerFlattenables.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/IGraphicBufferProducerFlattenables.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/IGraphicBufferProducerFlattenables.cpp')
-rw-r--r--libs/gui/IGraphicBufferProducerFlattenables.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/gui/IGraphicBufferProducerFlattenables.cpp b/libs/gui/IGraphicBufferProducerFlattenables.cpp
index 4e92a39973..8b2e2ddc59 100644
--- a/libs/gui/IGraphicBufferProducerFlattenables.cpp
+++ b/libs/gui/IGraphicBufferProducerFlattenables.cpp
@@ -128,7 +128,7 @@ status_t IGraphicBufferProducer::QueueBufferInput::unflatten(
constexpr size_t IGraphicBufferProducer::QueueBufferOutput::minFlattenedSize() {
return sizeof(width) + sizeof(height) + sizeof(transformHint) + sizeof(numPendingBuffers) +
sizeof(nextFrameNumber) + sizeof(bufferReplaced) + sizeof(maxBufferCount) +
- sizeof(result);
+ sizeof(result) + sizeof(isSlotExpansionAllowed);
}
size_t IGraphicBufferProducer::QueueBufferOutput::getFlattenedSize() const {
return minFlattenedSize() + frameTimestamps.getFlattenedSize();
@@ -152,6 +152,7 @@ status_t IGraphicBufferProducer::QueueBufferOutput::flatten(
FlattenableUtils::write(buffer, size, nextFrameNumber);
FlattenableUtils::write(buffer, size, bufferReplaced);
FlattenableUtils::write(buffer, size, maxBufferCount);
+ FlattenableUtils::write(buffer, size, isSlotExpansionAllowed);
status_t result = frameTimestamps.flatten(buffer, size, fds, count);
if (result != NO_ERROR) {
@@ -175,6 +176,7 @@ status_t IGraphicBufferProducer::QueueBufferOutput::unflatten(
FlattenableUtils::read(buffer, size, nextFrameNumber);
FlattenableUtils::read(buffer, size, bufferReplaced);
FlattenableUtils::read(buffer, size, maxBufferCount);
+ FlattenableUtils::read(buffer, size, isSlotExpansionAllowed);
status_t result = frameTimestamps.unflatten(buffer, size, fds, count);
if (result != NO_ERROR) {