Permalink
Browse files

BufferQueue: Increase MIN_UNDEQUEUED from 2 to 3.

If 2 queueBuffers happen fairly closely, the former buffer is not picked by
display. But SurfaceTexture won't return this to clients, since its not the
oldest. It will return the locked buffer causing deadlock.

Increasing the min_dequeued buffer count to 3 (from 2) will increase the
distance between video and display by 1 more.

CRs-fixed: 382393

Change-Id: I275c01473c7057714da35693dfda7a358e9d9285
  • Loading branch information...
1 parent 119e032 commit 1a5f0b044fdb6b8a5c809891cf6942704d7ce8cc Saurabh Shah committed with Whitehawkx Aug 14, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 include/gui/BufferQueue.h
@@ -34,7 +34,11 @@ namespace android {
class BufferQueue : public BnSurfaceTexture {
public:
+#ifdef QCOM_HARDWARE
+ enum { MIN_UNDEQUEUED_BUFFERS = 3 };
+#else
enum { MIN_UNDEQUEUED_BUFFERS = 2 };
+#endif
enum { NUM_BUFFER_SLOTS = 32 };
enum { NO_CONNECTED_API = 0 };
enum { INVALID_BUFFER_SLOT = -1 };

0 comments on commit 1a5f0b0

Please sign in to comment.