Lines Matching refs:slot

196 void BufferQueueCore::clearBufferSlotLocked(int slot) {
197 BQ_LOGV("clearBufferSlotLocked: slot %d", slot);
199 mSlots[slot].mGraphicBuffer.clear();
200 mSlots[slot].mBufferState.reset();
201 mSlots[slot].mRequestBufferCalled = false;
202 mSlots[slot].mFrameNumber = 0;
203 mSlots[slot].mAcquireCalled = false;
204 mSlots[slot].mNeedsReallocation = true;
207 if (mSlots[slot].mEglFence != EGL_NO_SYNC_KHR) {
208 eglDestroySyncKHR(mSlots[slot].mEglDisplay, mSlots[slot].mEglFence);
209 mSlots[slot].mEglFence = EGL_NO_SYNC_KHR;
211 mSlots[slot].mFence = Fence::NO_FENCE;
212 mSlots[slot].mEglDisplay = EGL_NO_DISPLAY;
214 if (mLastQueuedSlot == slot) {
242 // slot-to-buffer-handle mappings and will not be able to otherwise
270 int slot = mUnusedSlots.back();
272 mFreeSlots.insert(slot);
283 auto slot = mFreeSlots.begin();
284 clearBufferSlotLocked(*slot);
285 mUnusedSlots.push_back(*slot);
286 mFreeSlots.erase(slot);
288 int slot = mFreeBuffers.back();
289 clearBufferSlotLocked(slot);
290 mUnusedSlots.push_back(slot);
312 for (int slot = 0; slot < BufferQueueDefs::NUM_BUFFER_SLOTS; ++slot) {
313 bool isInFreeSlots = mFreeSlots.count(slot) != 0;
315 std::find(mFreeBuffers.cbegin(), mFreeBuffers.cend(), slot) !=
317 bool isInActiveBuffers = mActiveBuffers.count(slot) != 0;
319 std::find(mUnusedSlots.cbegin(), mUnusedSlots.cend(), slot) !=
328 BQ_LOGE("Slot %d is in mUnusedSlots and in mFreeSlots", slot);
332 BQ_LOGE("Slot %d is in mUnusedSlots and in mFreeBuffers", slot);
337 slot);
340 if (!mSlots[slot].mBufferState.isFree()) {
341 BQ_LOGE("Slot %d is in mUnusedSlots but is not FREE", slot);
344 if (mSlots[slot].mGraphicBuffer != NULL) {
346 slot);
351 BQ_LOGE("Slot %d is in mFreeSlots and in mUnusedSlots", slot);
355 BQ_LOGE("Slot %d is in mFreeSlots and in mFreeBuffers", slot);
359 BQ_LOGE("Slot %d is in mFreeSlots and in mActiveBuffers", slot);
362 if (!mSlots[slot].mBufferState.isFree()) {
363 BQ_LOGE("Slot %d is in mFreeSlots but is not FREE", slot);
366 if (mSlots[slot].mGraphicBuffer != NULL) {
368 slot);
373 BQ_LOGE("Slot %d is in mFreeBuffers and in mUnusedSlots", slot);
377 BQ_LOGE("Slot %d is in mFreeBuffers and in mFreeSlots", slot);
382 slot);
385 if (!mSlots[slot].mBufferState.isFree()) {
386 BQ_LOGE("Slot %d is in mFreeBuffers but is not FREE", slot);
389 if (mSlots[slot].mGraphicBuffer == NULL) {
390 BQ_LOGE("Slot %d is in mFreeBuffers but has no buffer", slot);
396 slot);
400 BQ_LOGE("Slot %d is in mActiveBuffers and in mFreeSlots", slot);
405 slot);
408 if (mSlots[slot].mBufferState.isFree() &&
409 !mSlots[slot].mBufferState.isShared()) {
410 BQ_LOGE("Slot %d is in mActiveBuffers but is FREE", slot);
413 if (mSlots[slot].mGraphicBuffer == NULL && !mIsAllocating) {
414 BQ_LOGE("Slot %d is in mActiveBuffers but has no buffer", slot);
419 "mFreeBuffers, or mActiveBuffers", slot);