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

Commit 0c1e8041 authored by Robert Carr's avatar Robert Carr Committed by Automerger Merge Worker
Browse files

BLASTBufferQueue: Avoid duplicate calls to setDefaultBufferSize am: fc416512

Change-Id: I56c8f9dffa656f17a0e51c316ad741dc2e63c041
parents 5ee672ab fc416512
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -132,10 +132,13 @@ BLASTBufferQueue::BLASTBufferQueue(const sp<SurfaceControl>& surface, int width,
void BLASTBufferQueue::update(const sp<SurfaceControl>& surface, int width, int height) {
    std::unique_lock _lock{mMutex};
    mSurfaceControl = surface;

    if (mWidth != width || mHeight != height) {
        mWidth = width;
        mHeight = height;
        mBufferItemConsumer->setDefaultBufferSize(mWidth, mHeight);
    }
}

static void transactionCallbackThunk(void* context, nsecs_t latchTime,
                                     const sp<Fence>& presentFence,