diff options
author | Jamie Gennis <jgennis@google.com> | 2012-08-24 20:26:34 -0700 |
---|---|---|
committer | Jamie Gennis <jgennis@google.com> | 2012-08-29 15:35:34 -0700 |
commit | e191e6c34829aec406a9cfe3e95211f884a311ff (patch) | |
tree | 00bc3d5e16b6045f021cdca7474f34fa8a237031 /include/gui | |
parent | 31a353da225af5329735451c761b430d82dfda1b (diff) | |
download | frameworks_native-e191e6c34829aec406a9cfe3e95211f884a311ff.zip frameworks_native-e191e6c34829aec406a9cfe3e95211f884a311ff.tar.gz frameworks_native-e191e6c34829aec406a9cfe3e95211f884a311ff.tar.bz2 |
BufferQueue: simplify max buffer count handling
This change reworks how the maximum buffer count is computed.
Change-Id: I7d3745814b9bd6f6f447f86bfea8eb7729914ebf
Diffstat (limited to 'include/gui')
-rw-r--r-- | include/gui/BufferQueue.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/include/gui/BufferQueue.h b/include/gui/BufferQueue.h index 20cb69e..5b68b05 100644 --- a/include/gui/BufferQueue.h +++ b/include/gui/BufferQueue.h @@ -307,6 +307,19 @@ private: // given the current BufferQueue state. int getMinMaxBufferCountLocked() const; + // getMaxBufferCountLocked returns the maximum number of buffers that can + // be allocated at once. This value depends upon the following member + // variables: + // + // mSynchronousMode + // mMinUndequeuedBuffers + // mDefaultMaxBufferCount + // mOverrideMaxBufferCount + // + // Any time one of these member variables is changed while a producer is + // connected, mDequeueCondition must be broadcast. + int getMaxBufferCountLocked() const; + struct BufferSlot { BufferSlot() @@ -433,10 +446,6 @@ private: // not dequeued at any time int mMinUndequeuedBuffers; - // mMaxBufferCount is the maximum number of buffers that will be allocated - // at once. - int mMaxBufferCount; - // mDefaultMaxBufferCount is the default limit on the number of buffers // that will be allocated at one time. This default limit is set by the // consumer. The limit (as opposed to the default limit) may be |