summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJamie Gennis <jgennis@google.com>2012-09-04 14:58:50 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-04 14:58:51 -0700
commit493db47929cdd805339e453062fef265d8985692 (patch)
treed2d53c5b5942fd866324cb234430b8db3a1296e5 /include
parente84ec393bb48e4817eaa280ee51c099af041b14c (diff)
parentc68f2ecfa02037144d1a3856f637a77f523cf416 (diff)
downloadframeworks_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.h4
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