diff options
author | 2014-03-03 10:16:19 -0800 | |
---|---|---|
committer | 2014-03-04 15:58:03 -0800 | |
commit | 3e96f1982fda358424b0b75f394cbf7c1794a072 (patch) | |
tree | b5a25e2624e31ee016e8f3f2a9f3f7697591e8c5 /libs/gui/BufferQueueConsumer.cpp | |
parent | 289ade165e60b5f71734d30e535f16eb1f4313ad (diff) |
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
Diffstat (limited to 'libs/gui/BufferQueueConsumer.cpp')
-rw-r--r-- | libs/gui/BufferQueueConsumer.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
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 <gui/BufferItem.h> #include <gui/BufferQueueConsumer.h> #include <gui/BufferQueueCore.h> @@ -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); } |