Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 1a5f0b044fdb6b8a5c809891cf6942704d7ce8cc 1 parent 119e032
Saurabh Shah authored Whitehawkx committed
Showing with 4 additions and 0 deletions.
  1. +4 −0 include/gui/BufferQueue.h
4 include/gui/BufferQueue.h
View
@@ -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 };
Please sign in to comment.
Something went wrong with that request. Please try again.