diff options
| author | 2019-07-09 15:15:55 -0700 | |
|---|---|---|
| committer | 2019-07-09 15:15:55 -0700 | |
| commit | 4d90373273263e55e48a2ddab2e89a047ae49412 (patch) | |
| tree | f5aa60c6e1a97dbef2b22e0267f70e0f564a588a /libs/gui/BufferQueueProducer.cpp | |
| parent | 8add7a99c4c909fbd7acde9e26ae5aa1a8c61872 (diff) | |
| parent | 6431a9bc8f0243205fa09fa316f84bdfe13858c4 (diff) | |
DO NOT MERGE - Merge pie-platform-release (PPRL.190705.004) into master
Bug: 136196576
Change-Id: Id1667c08d51f9bc0e8095f97944e35c8082e9bec
Diffstat (limited to 'libs/gui/BufferQueueProducer.cpp')
| -rw-r--r-- | libs/gui/BufferQueueProducer.cpp | 16 |
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; } |