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

Commit cbc317eb authored by Sungtak Lee's avatar Sungtak Lee Committed by android-build-merger
Browse files

Drop buffers for SurfaceFlinger properly

am: 45e9e0b1

Change-Id: I3d222f8caf86f35f022e9a79fd5b911526a154a1
parents dd913d00 45e9e0b1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -886,7 +886,7 @@ status_t BufferQueueProducer::queueBuffer(int slot,
        item.mFence = acquireFence;
        item.mFenceTime = acquireFenceTime;
        item.mIsDroppable = mCore->mAsyncMode ||
                (!mCore->mLegacyBufferDrop && mConsumerIsSurfaceFlinger) ||
                (mConsumerIsSurfaceFlinger && mCore->mQueueBufferCanDrop) ||
                (mCore->mLegacyBufferDrop && mCore->mQueueBufferCanDrop) ||
                (mCore->mSharedBufferMode && mCore->mSharedBufferSlot == slot);
        item.mSurfaceDamage = surfaceDamage;
+2 −1
Original line number Diff line number Diff line
@@ -233,7 +233,8 @@ private:

    // mLegacyBufferDrop indicates whether mQueueBufferCanDrop is in effect.
    // If this flag is set mQueueBufferCanDrop is working as explained. If not
    // queueBuffer will not drop buffers unless consumer is SurfaceFlinger.
    // queueBuffer will not drop buffers unless consumer is SurfaceFlinger and
    // mQueueBufferCanDrop is set.
    bool mLegacyBufferDrop;

    // mDefaultBufferFormat can be set so it will override the buffer format