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

Commit fb5a3b76 authored by Carlos Martinez Romero's avatar Carlos Martinez Romero
Browse files

RingBufferConsumer - Remove unnecessary grab

The mGraphicBuffer is filled in already in ConsumerBase::acquireBufferLocked
adding it from the slots is not needed.

Test: atest, presubmit, compiles
Bug: 342197847
Flag: com.android.graphics.libgui.flags.wb_ring_buffer
Change-Id: I0969c02da294fc634eb9917697701f34cfe72ae1
parent 92fb230c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define LOG_TAG "RingBufferConsumer"
#define ATRACE_TAG ATRACE_TAG_GRAPHICS

#include <com_android_graphics_libgui_flags.h>
#include <inttypes.h>

#include <utils/Log.h>
@@ -317,7 +318,9 @@ void RingBufferConsumer::onFrameAvailable(const BufferItem& item) {

        mLatestTimestamp = item.mTimestamp;

#if !COM_ANDROID_GRAPHICS_LIBGUI_FLAGS(WB_RING_BUFFER)
        item.mGraphicBuffer = mSlots[item.mSlot].mGraphicBuffer;
#endif
    } // end of mMutex lock

    ConsumerBase::onFrameAvailable(item);