summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueProducer.cpp
diff options
context:
space:
mode:
author Treehugger Robot <treehugger-gerrit@google.com> 2019-12-20 20:03:59 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2019-12-20 20:03:59 +0000
commit3d04184bd246d959af655e5dab63bf03fd5771ba (patch)
tree58b0308e6c0b53c4651268647999d2277574c162 /libs/gui/BufferQueueProducer.cpp
parent44462ace14e001a3658867c221322d8b3187bcad (diff)
parent544c52279b9348760314ebbd705ffa94e13ae28b (diff)
Merge "Change the position of addAndGetFrameTimestamps when queueBuffer"
Diffstat (limited to 'libs/gui/BufferQueueProducer.cpp')
-rw-r--r--libs/gui/BufferQueueProducer.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp
index 92ab41019e..3efb1b6acb 100644
--- a/libs/gui/BufferQueueProducer.cpp
+++ b/libs/gui/BufferQueueProducer.cpp
@@ -981,6 +981,17 @@ status_t BufferQueueProducer::queueBuffer(int slot,
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
// lock held so we can ensure that callbacks occur in order
@@ -1010,17 +1021,6 @@ status_t BufferQueueProducer::queueBuffer(int slot,
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
if (connectedApi == NATIVE_WINDOW_API_EGL) {
// Waiting here allows for two full buffers to be queued but not a