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

Commit ba45baec authored by Adithya Srinivasan's avatar Adithya Srinivasan
Browse files

Add tracing for onFrameReplaced

As a part of the queueBuffer call, in async mode, the buffer at the
front of the queue can be replaced. This change adds a tracing for such
replace call and will use the same event type as Queue.

Test: Run GAPID vulkan cube app or any other app that uses async mode
and check if Queue event shows up
Bug: 145828619

Change-Id: I9f86c79dab09bf1071a79adbb743276e07a9b47f
parent 6f6e2305
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -455,6 +455,10 @@ void BufferQueueLayer::onFrameReplaced(const BufferItem& item) {
        mLastFrameNumberReceived = item.mFrameNumber;
        mQueueItemCondition.broadcast();
    }

    const int32_t layerId = getSequence();
    mFlinger->mFrameTracer->traceTimestamp(layerId, item.mGraphicBuffer->getId(), item.mFrameNumber,
                                           systemTime(), FrameTracer::FrameEvent::QUEUE);
    mConsumer->onBufferAvailable(item);
}