diff options
Diffstat (limited to 'libs')
| -rw-r--r-- | libs/gui/BLASTBufferQueue.cpp | 8 | ||||
| -rw-r--r-- | libs/gui/include/gui/BLASTBufferQueue.h | 2 |
2 files changed, 4 insertions, 6 deletions
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp index 82c9268feb..9490314b71 100644 --- a/libs/gui/BLASTBufferQueue.cpp +++ b/libs/gui/BLASTBufferQueue.cpp @@ -130,8 +130,7 @@ void BLASTBufferItemConsumer::onSidebandStreamChanged() { } 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 @@ BLASTBufferQueue::BLASTBufferQueue(const std::string& name, const sp<SurfaceCont // 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, diff --git a/libs/gui/include/gui/BLASTBufferQueue.h b/libs/gui/include/gui/BLASTBufferQueue.h index dd8e714e23..9516bfb4b0 100644 --- a/libs/gui/include/gui/BLASTBufferQueue.h +++ b/libs/gui/include/gui/BLASTBufferQueue.h @@ -74,7 +74,7 @@ class BLASTBufferQueue { public: BLASTBufferQueue(const std::string& name, const sp<SurfaceControl>& surface, int width, - int height, int32_t format, bool enableTripleBuffering = true); + int height, int32_t format); sp<IGraphicBufferProducer> getIGraphicBufferProducer() const { return mProducer; |