Remove legacy disable triple buffering config
The config changes the dequeue limit of BQ (setMaxDequeuedBufferCount) from 2 to 1, decreasing the default size of the queue from (3 to 2).
Some of the motivations behind this change include:
- not applicable in most scenarios since producers in the system override this
- breaks async mode, not well tested in other scenarios
- simplifying some of the implementation and removes a configuration/flag.
Clients can still manually call setMaxDequeuedBufferCount if they wish.
Test: presubmit
Fixes: 182314340
Change-Id: Iea88e8a795b91ff325610cfb1eefbcfe6e434841
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp
index 82c9268..9490314 100644
--- a/libs/gui/BLASTBufferQueue.cpp
+++ b/libs/gui/BLASTBufferQueue.cpp
@@ -130,8 +130,7 @@
}
BLASTBufferQueue::BLASTBufferQueue(const std::string& name, const sp<SurfaceControl>& surface,
- int width, int height, int32_t format,
- bool enableTripleBuffering)
+ int width, int height, int32_t format)
: mName(name),
mSurfaceControl(surface),
mSize(width, height),
@@ -143,9 +142,8 @@
// explicitly so that dequeueBuffer will block
mProducer->setDequeueTimeout(std::numeric_limits<int64_t>::max());
- if (enableTripleBuffering) {
- mProducer->setMaxDequeuedBufferCount(2);
- }
+ // safe default, most producers are expected to override this
+ mProducer->setMaxDequeuedBufferCount(2);
mBufferItemConsumer = new BLASTBufferItemConsumer(mConsumer,
GraphicBuffer::USAGE_HW_COMPOSER |
GraphicBuffer::USAGE_HW_TEXTURE,