From 3e96f1982fda358424b0b75f394cbf7c1794a072 Mon Sep 17 00:00:00 2001 From: Dan Stoza Date: Mon, 3 Mar 2014 10:16:19 -0800 Subject: Change BufferQueue into producer/consumer wrapper Now that BufferQueue has been split into core + producer + consumer, rewrite BufferQueue to be a thin layer over a producer and consumer interface. Eventually, this layer will be deprecated in favor of only using either the producer or consumer interface, as applicable. Change-Id: I340ae5f5b633b244fb594615ff52ba50b9e2f7e4 --- libs/gui/BufferQueueConsumer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'libs/gui/BufferQueueConsumer.cpp') diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp index 7b70df15f9..dc7aa157f3 100644 --- a/libs/gui/BufferQueueConsumer.cpp +++ b/libs/gui/BufferQueueConsumer.cpp @@ -14,6 +14,10 @@ * limitations under the License. */ +#define LOG_TAG "BufferQueueConsumer" +#define ATRACE_TAG ATRACE_TAG_GRAPHICS +//#define LOG_NDEBUG 0 + #include #include #include @@ -38,7 +42,7 @@ status_t BufferQueueConsumer::acquireBuffer(BufferItem* outBuffer, // buffer so that the consumer can successfully set up the newly acquired // buffer before releasing the old one. int numAcquiredBuffers = 0; - for (int s = 0; s < BufferQueueCore::NUM_BUFFER_SLOTS; ++s) { + for (int s = 0; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) { if (mSlots[s].mBufferState == BufferSlot::ACQUIRED) { ++numAcquiredBuffers; } @@ -275,7 +279,7 @@ status_t BufferQueueConsumer::getReleasedBuffers(uint32_t *outSlotMask) { } uint32_t mask = 0; - for (int s = 0; s < BufferQueueCore::NUM_BUFFER_SLOTS; ++s) { + for (int s = 0; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) { if (!mSlots[s].mAcquireCalled) { mask |= (1u << s); } -- cgit v1.2.3-59-g8ed1b