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

Commit c6f89eeb authored by Vishnu Nair's avatar Vishnu Nair
Browse files

BLASTBufferQueue: Pass in an invalid expected present time when acquiring a buffer

Passing in 0 will acquire the buffer regardless of the buffer's
timestamp. On the client side, we want to acquire the buffer and
send it to SF to apply any buffer presentation logic.

Bug: 175396534, 168917217
Test: GtsMediaTestCases

Change-Id: I7f5007d0ebb15c651741ad4e011c4ad8dabbd912
parent c14d27b0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -42,6 +42,10 @@ namespace android {
// Macros to include adapter info in log messages
#define BQA_LOGV(x, ...) \
    ALOGV("[%s](f:%u,a:%u) " x, mName.c_str(), mNumFrameAvailable, mNumAcquired, ##__VA_ARGS__)
// enable logs for a single layer
//#define BQA_LOGV(x, ...) \
//    ALOGV_IF((strstr(mName.c_str(), "SurfaceView") != nullptr), "[%s](f:%u,a:%u) " x, \
//              mName.c_str(), mNumFrameAvailable, mNumAcquired, ##__VA_ARGS__)
#define BQA_LOGE(x, ...) \
    ALOGE("[%s](f:%u,a:%u) " x, mName.c_str(), mNumFrameAvailable, mNumAcquired, ##__VA_ARGS__)

@@ -248,7 +252,8 @@ void BLASTBufferQueue::processNextBufferLocked(bool useNextTransaction) {

    BufferItem bufferItem;

    status_t status = mBufferItemConsumer->acquireBuffer(&bufferItem, -1, false);
    status_t status =
            mBufferItemConsumer->acquireBuffer(&bufferItem, 0 /* expectedPresent */, false);
    if (status != OK) {
        BQA_LOGE("Failed to acquire a buffer, err=%s", statusToString(status).c_str());
        return;