BufferQueue: Increase max slots from 32 to 64
Increases NUM_BUFFER_SLOTS from 32 to 64 and changes the mask
returned by IGBC::getReleasedBuffers from 32 to 64 bits.
Bug: 13174352
Change-Id: Ie8ef0853916cfb91f83881c7241886bb1950f01a
diff --git a/libs/gui/BufferQueueConsumer.cpp b/libs/gui/BufferQueueConsumer.cpp
index 756cd61..985dcaa 100644
--- a/libs/gui/BufferQueueConsumer.cpp
+++ b/libs/gui/BufferQueueConsumer.cpp
@@ -346,7 +346,7 @@
return NO_ERROR;
}
-status_t BufferQueueConsumer::getReleasedBuffers(uint32_t *outSlotMask) {
+status_t BufferQueueConsumer::getReleasedBuffers(uint64_t *outSlotMask) {
ATRACE_CALL();
if (outSlotMask == NULL) {
@@ -361,10 +361,10 @@
return NO_INIT;
}
- uint32_t mask = 0;
+ uint64_t mask = 0;
for (int s = 0; s < BufferQueueDefs::NUM_BUFFER_SLOTS; ++s) {
if (!mSlots[s].mAcquireCalled) {
- mask |= (1u << s);
+ mask |= (1ULL << s);
}
}
@@ -374,12 +374,12 @@
BufferQueueCore::Fifo::iterator current(mCore->mQueue.begin());
while (current != mCore->mQueue.end()) {
if (current->mAcquireCalled) {
- mask &= ~(1u << current->mSlot);
+ mask &= ~(1ULL << current->mSlot);
}
++current;
}
- BQ_LOGV("getReleasedBuffers: returning mask %#x", mask);
+ BQ_LOGV("getReleasedBuffers: returning mask %#" PRIx64, mask);
*outSlotMask = mask;
return NO_ERROR;
}