Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ecd18ce1 authored by Rob Carr's avatar Rob Carr Committed by Automerger Merge Worker
Browse files

Merge "BLASTBufferQueue: Don't query for triple buffering" into rvc-dev am:...

Merge "BLASTBufferQueue: Don't query for triple buffering" into rvc-dev am: 2a696174 am: 8ec5051f

Change-Id: Ic9befda7d38238c3089ca5f66d4714d80d5d9699
parents 7c306257 8ec5051f
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -95,7 +95,8 @@ void BLASTBufferItemConsumer::getConnectionEvents(uint64_t frameNumber, bool* ne
    if (needsDisconnect != nullptr) *needsDisconnect = disconnect;
}

BLASTBufferQueue::BLASTBufferQueue(const sp<SurfaceControl>& surface, int width, int height)
BLASTBufferQueue::BLASTBufferQueue(const sp<SurfaceControl>& surface, int width, int height,
                                   bool enableTripleBuffering)
      : mSurfaceControl(surface),
        mWidth(width),
        mHeight(height),
@@ -105,8 +106,7 @@ BLASTBufferQueue::BLASTBufferQueue(const sp<SurfaceControl>& surface, int width,
    // explicitly so that dequeueBuffer will block
    mProducer->setDequeueTimeout(std::numeric_limits<int64_t>::max());

    int8_t disableTripleBuffer = property_get_bool("ro.sf.disable_triple_buffer", 0);
    if (!disableTripleBuffer) {
    if (enableTripleBuffering) {
        mProducer->setMaxDequeuedBufferCount(2);
    }
    mBufferItemConsumer =
+3 −1
Original line number Diff line number Diff line
@@ -66,7 +66,9 @@ class BLASTBufferQueue
    : public ConsumerBase::FrameAvailableListener, public BufferItemConsumer::BufferFreedListener
{
public:
    BLASTBufferQueue(const sp<SurfaceControl>& surface, int width, int height);
    BLASTBufferQueue(const sp<SurfaceControl>& surface, int width, int height,
                     bool enableTripleBuffering = true);

    sp<IGraphicBufferProducer> getIGraphicBufferProducer() const {
        return mProducer;
    }