Lines Matching refs:slot
227 int slot = BufferQueueCore::INVALID_BUFFER_SLOT; in acquireBuffer() local
233 slot = mCore->mSharedBufferSlot; in acquireBuffer()
237 outBuffer->mGraphicBuffer = mSlots[slot].mGraphicBuffer; in acquireBuffer()
247 outBuffer->mSlot = slot; in acquireBuffer()
248 outBuffer->mAcquireCalled = mSlots[slot].mAcquireCalled; in acquireBuffer()
258 slot = front->mSlot; in acquireBuffer()
262 ATRACE_BUFFER_INDEX(slot); in acquireBuffer()
265 slot, outBuffer->mFrameNumber, outBuffer->mGraphicBuffer->handle); in acquireBuffer()
268 mSlots[slot].mAcquireCalled = true; in acquireBuffer()
273 mSlots[slot].mBufferState.acquireNotInQueue(); in acquireBuffer()
275 mSlots[slot].mBufferState.acquire(); in acquireBuffer()
277 mSlots[slot].mFence = Fence::NO_FENCE; in acquireBuffer()
311 status_t BufferQueueConsumer::detachBuffer(int slot) { in detachBuffer() argument
313 ATRACE_BUFFER_INDEX(slot); in detachBuffer()
314 BQ_LOGV("detachBuffer: slot %d", slot); in detachBuffer()
322 if (mCore->mSharedBufferMode || slot == mCore->mSharedBufferSlot) { in detachBuffer()
327 if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) { in detachBuffer()
329 slot, BufferQueueDefs::NUM_BUFFER_SLOTS); in detachBuffer()
331 } else if (!mSlots[slot].mBufferState.isAcquired()) { in detachBuffer()
333 "(state = %s)", slot, mSlots[slot].mBufferState.string()); in detachBuffer()
337 mSlots[slot].mBufferState.detachConsumer(); in detachBuffer()
338 mCore->mActiveBuffers.erase(slot); in detachBuffer()
339 mCore->mFreeSlots.insert(slot); in detachBuffer()
340 mCore->clearBufferSlotLocked(slot); in detachBuffer()
391 auto slot = mCore->mFreeSlots.begin(); in attachBuffer() local
392 found = *slot; in attachBuffer()
393 mCore->mFreeSlots.erase(slot); in attachBuffer()
436 status_t BufferQueueConsumer::releaseBuffer(int slot, uint64_t frameNumber, in releaseBuffer() argument
440 ATRACE_BUFFER_INDEX(slot); in releaseBuffer()
442 if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS || in releaseBuffer()
444 BQ_LOGE("releaseBuffer: slot %d out of range or fence %p NULL", slot, in releaseBuffer()
458 if (frameNumber != mSlots[slot].mFrameNumber && in releaseBuffer()
459 !mSlots[slot].mBufferState.isShared()) { in releaseBuffer()
463 if (!mSlots[slot].mBufferState.isAcquired()) { in releaseBuffer()
465 "but its state was %s", slot, in releaseBuffer()
466 mSlots[slot].mBufferState.string()); in releaseBuffer()
470 mSlots[slot].mEglDisplay = eglDisplay; in releaseBuffer()
471 mSlots[slot].mEglFence = eglFence; in releaseBuffer()
472 mSlots[slot].mFence = releaseFence; in releaseBuffer()
473 mSlots[slot].mBufferState.release(); in releaseBuffer()
478 if (!mCore->mSharedBufferMode && mSlots[slot].mBufferState.isFree()) { in releaseBuffer()
479 mSlots[slot].mBufferState.mShared = false; in releaseBuffer()
482 if (!mSlots[slot].mBufferState.isShared()) { in releaseBuffer()
483 mCore->mActiveBuffers.erase(slot); in releaseBuffer()
484 mCore->mFreeBuffers.push_back(slot); in releaseBuffer()
490 BQ_LOGV("releaseBuffer: releasing slot %d", slot); in releaseBuffer()
669 for (int slot : mCore->mActiveBuffers) { in setMaxAcquiredBufferCount() local
670 if (mSlots[slot].mBufferState.isAcquired()) { in setMaxAcquiredBufferCount()