always pass the BufferQueue explicitely to consumers
Change-Id: I883b0a7b19d8e722f9ab714ba6f49e658b02ca86
diff --git a/libs/gui/CpuConsumer.cpp b/libs/gui/CpuConsumer.cpp
index 56bc7c6..adddfc2 100644
--- a/libs/gui/CpuConsumer.cpp
+++ b/libs/gui/CpuConsumer.cpp
@@ -30,8 +30,9 @@
namespace android {
-CpuConsumer::CpuConsumer(uint32_t maxLockedBuffers, bool synchronousMode) :
- ConsumerBase(new BufferQueue(true) ),
+CpuConsumer::CpuConsumer(const sp<BufferQueue>& bq,
+ uint32_t maxLockedBuffers, bool synchronousMode) :
+ ConsumerBase(bq),
mMaxLockedBuffers(maxLockedBuffers),
mCurrentLockedBuffers(0)
{