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

Commit 03e9895b authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

Merge "Change the position of addAndGetFrameTimestamps when queueBuffer" am:...

Merge "Change the position of addAndGetFrameTimestamps when queueBuffer" am: 3d04184b am: 2c09b198

Change-Id: I9e0a7fa54b16872e17137904c9607752b358b54d
parents 465c64db 2c09b198
Loading
Loading
Loading
Loading
+11 −11
Original line number Original line Diff line number Diff line
@@ -981,6 +981,17 @@ status_t BufferQueueProducer::queueBuffer(int slot,
        item.mGraphicBuffer.clear();
        item.mGraphicBuffer.clear();
    }
    }


    // Update and get FrameEventHistory.
    nsecs_t postedTime = systemTime(SYSTEM_TIME_MONOTONIC);
    NewFrameEventsEntry newFrameEventsEntry = {
        currentFrameNumber,
        postedTime,
        requestedPresentTimestamp,
        std::move(acquireFenceTime)
    };
    addAndGetFrameTimestamps(&newFrameEventsEntry,
            getFrameTimestamps ? &output->frameTimestamps : nullptr);

    // Call back without the main BufferQueue lock held, but with the callback
    // Call back without the main BufferQueue lock held, but with the callback
    // lock held so we can ensure that callbacks occur in order
    // lock held so we can ensure that callbacks occur in order


@@ -1010,17 +1021,6 @@ status_t BufferQueueProducer::queueBuffer(int slot,
        mCallbackCondition.notify_all();
        mCallbackCondition.notify_all();
    }
    }


    // Update and get FrameEventHistory.
    nsecs_t postedTime = systemTime(SYSTEM_TIME_MONOTONIC);
    NewFrameEventsEntry newFrameEventsEntry = {
        currentFrameNumber,
        postedTime,
        requestedPresentTimestamp,
        std::move(acquireFenceTime)
    };
    addAndGetFrameTimestamps(&newFrameEventsEntry,
            getFrameTimestamps ? &output->frameTimestamps : nullptr);

    // Wait without lock held
    // Wait without lock held
    if (connectedApi == NATIVE_WINDOW_API_EGL) {
    if (connectedApi == NATIVE_WINDOW_API_EGL) {
        // Waiting here allows for two full buffers to be queued but not a
        // Waiting here allows for two full buffers to be queued but not a