diff options
author | Eric Penner <epenner@google.com> | 2014-09-30 11:28:30 -0700 |
---|---|---|
committer | Eric Penner <epenner@google.com> | 2014-10-03 14:57:09 -0700 |
commit | 99a0afbaee9eddabc2b544e3a5c432901c1d498c (patch) | |
tree | eb2add5f603b0709134e855f35d2a8016bcfc642 /include/gui | |
parent | 6c925ede620f4080227bb1fe8a41e4b4502348f8 (diff) | |
download | frameworks_native-99a0afbaee9eddabc2b544e3a5c432901c1d498c.zip frameworks_native-99a0afbaee9eddabc2b544e3a5c432901c1d498c.tar.gz frameworks_native-99a0afbaee9eddabc2b544e3a5c432901c1d498c.tar.bz2 |
BufferQueueProducer: Throttle EGL frame production.
Throttling was previously controlled by a combination of the
driver and the number of buffers in the queue. This patch makes
a more consistent trade-off, which allows two GPU frames pending
but not three. More buffering could improve throughput in the
case of varying frame times, but this also increases latency.
Bug: 17502897
Change-Id: I4ee68019ca94c635294c5959931a555a6c4ef2df
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/BufferQueueProducer.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/gui/BufferQueueProducer.h b/include/gui/BufferQueueProducer.h index 3fc5de2..c619a11 100644 --- a/include/gui/BufferQueueProducer.h +++ b/include/gui/BufferQueueProducer.h @@ -197,6 +197,12 @@ private: uint32_t mStickyTransform; + // This saves the fence from the last queueBuffer, such that the + // next queueBuffer call can throttle buffer production. The prior + // queueBuffer's fence is not nessessarily available elsewhere, + // since the previous buffer might have already been acquired. + sp<Fence> mLastQueueBufferFence; + }; // class BufferQueueProducer } // namespace android |