summaryrefslogtreecommitdiff
path: root/libs/gui/BufferQueueProducer.cpp
diff options
context:
space:
mode:
author android-build-team Robot <android-build-team-robot@google.com> 2019-05-03 09:17:29 +0000
committer android-build-team Robot <android-build-team-robot@google.com> 2019-05-03 09:17:29 +0000
commit116e3cc8f7ccaf1aa05c7e8e6e6907b0a647ae88 (patch)
treeeed064e035212e494cabd777de2905513f8fb098 /libs/gui/BufferQueueProducer.cpp
parent78a11714dc12c6324584478b6e408b0290fe2377 (diff)
parentd637081295eabcf20cea0ecd2dff1b2444b8e8ca (diff)
Snap for 5526913 from d637081295eabcf20cea0ecd2dff1b2444b8e8ca to pi-qpr3-b-release
Change-Id: I337a470789f0e789a19d72cf565089c2da703c4e
Diffstat (limited to 'libs/gui/BufferQueueProducer.cpp')
-rw-r--r--libs/gui/BufferQueueProducer.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp
index c96a2dd6a3..9d7f14cb6e 100644
--- a/libs/gui/BufferQueueProducer.cpp
+++ b/libs/gui/BufferQueueProducer.cpp
@@ -989,14 +989,6 @@ status_t BufferQueueProducer::queueBuffer(int slot,
mCallbackCondition.broadcast();
}
- // Wait without lock held
- if (connectedApi == NATIVE_WINDOW_API_EGL) {
- // Waiting here allows for two full buffers to be queued but not a
- // third. In the event that frames take varying time, this makes a
- // small trade-off in favor of latency rather than throughput.
- lastQueuedFence->waitForever("Throttling EGL Production");
- }
-
// Update and get FrameEventHistory.
nsecs_t postedTime = systemTime(SYSTEM_TIME_MONOTONIC);
NewFrameEventsEntry newFrameEventsEntry = {
@@ -1008,6 +1000,14 @@ status_t BufferQueueProducer::queueBuffer(int slot,
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
+ // third. In the event that frames take varying time, this makes a
+ // small trade-off in favor of latency rather than throughput.
+ lastQueuedFence->waitForever("Throttling EGL Production");
+ }
+
return NO_ERROR;
}