diff options
author | Jamie Gennis <jgennis@google.com> | 2012-09-04 14:58:50 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-04 14:58:51 -0700 |
commit | 493db47929cdd805339e453062fef265d8985692 (patch) | |
tree | d2d53c5b5942fd866324cb234430b8db3a1296e5 /include | |
parent | e84ec393bb48e4817eaa280ee51c099af041b14c (diff) | |
parent | c68f2ecfa02037144d1a3856f637a77f523cf416 (diff) | |
download | frameworks_native-493db47929cdd805339e453062fef265d8985692.zip frameworks_native-493db47929cdd805339e453062fef265d8985692.tar.gz frameworks_native-493db47929cdd805339e453062fef265d8985692.tar.bz2 |
Merge "BufferQueue: add a setMaxAcquiredBufferCount check" into jb-mr1-dev
Diffstat (limited to 'include')
-rw-r--r-- | include/gui/BufferQueue.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gui/BufferQueue.h b/include/gui/BufferQueue.h index 0a95bb3..3481c6f 100644 --- a/include/gui/BufferQueue.h +++ b/include/gui/BufferQueue.h @@ -41,6 +41,10 @@ public: enum { INVALID_BUFFER_SLOT = -1 }; enum { STALE_BUFFER_SLOT = 1, NO_BUFFER_AVAILABLE }; + // When in async mode we reserve two slots in order to guarantee that the + // producer and consumer can run asynchronously. + enum { MAX_MAX_ACQUIRED_BUFFERS = NUM_BUFFER_SLOTS - 2 }; + // ConsumerListener is the interface through which the BufferQueue notifies // the consumer of events that the consumer may wish to react to. Because // the consumer will generally have a mutex that is locked during calls from |