summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Dan Stoza <stoza@google.com> 2015-05-12 14:55:15 -0700
committer Dan Stoza <stoza@google.com> 2015-05-12 15:03:52 -0700
commitcbe5459a99dcbd6e989fc1385d4575369b79d8ef (patch)
tree0949901e6ead1a834f314254c2756dc45ed14130
parent38d7f7550f5848b33b2e0a2048687fc22f708fda (diff)
libgui: Always allow allocation on connect
This change places BufferQueue into a predictable state where allocation is allowed whenever a producer connects. This allows clients to disconnect and reconnect without having to worry about being locked out of allocation. Bug: 20554276 Change-Id: Ic0f920a3d4204f2cafdfa69e46f3bb4204571d7e (cherry picked from commit 2b83cc920ac98498bee161e2b0e7befdfc82ca2b)
-rw-r--r--libs/gui/BufferQueueProducer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libs/gui/BufferQueueProducer.cpp b/libs/gui/BufferQueueProducer.cpp
index 7251d369ab..e318484d42 100644
--- a/libs/gui/BufferQueueProducer.cpp
+++ b/libs/gui/BufferQueueProducer.cpp
@@ -871,6 +871,7 @@ status_t BufferQueueProducer::connect(const sp<IProducerListener>& listener,
mCore->mBufferHasBeenQueued = false;
mCore->mDequeueBufferCannotBlock =
mCore->mConsumerControlledByApp && producerControlledByApp;
+ mCore->mAllowAllocation = true;
return status;
}