Lines Matching refs:found
251 std::unique_lock<std::mutex>& lock, int* found) const { in waitForFreeSlotThenRelock()
286 *found = BufferQueueCore::INVALID_BUFFER_SLOT; in waitForFreeSlotThenRelock()
303 *found = mCore->mSharedBufferSlot; in waitForFreeSlotThenRelock()
309 *found = slot; in waitForFreeSlotThenRelock()
311 *found = getFreeSlotLocked(); in waitForFreeSlotThenRelock()
317 *found = slot; in waitForFreeSlotThenRelock()
319 *found = getFreeBufferLocked(); in waitForFreeSlotThenRelock()
328 tryAgain = (*found == BufferQueueCore::INVALID_BUFFER_SLOT) || in waitForFreeSlotThenRelock()
413 int found = BufferItem::INVALID_BUFFER_SLOT; in dequeueBuffer() local
414 while (found == BufferItem::INVALID_BUFFER_SLOT) { in dequeueBuffer()
415 status_t status = waitForFreeSlotThenRelock(FreeSlotCaller::Dequeue, lock, &found); in dequeueBuffer()
421 if (found == BufferQueueCore::INVALID_BUFFER_SLOT) { in dequeueBuffer()
426 const sp<GraphicBuffer>& buffer(mSlots[found].mGraphicBuffer); in dequeueBuffer()
434 if (mCore->mSharedBufferSlot == found) { in dequeueBuffer()
438 mCore->mFreeSlots.insert(found); in dequeueBuffer()
439 mCore->clearBufferSlotLocked(found); in dequeueBuffer()
440 found = BufferItem::INVALID_BUFFER_SLOT; in dequeueBuffer()
446 const sp<GraphicBuffer>& buffer(mSlots[found].mGraphicBuffer); in dequeueBuffer()
447 if (mCore->mSharedBufferSlot == found && in dequeueBuffer()
455 if (mCore->mSharedBufferSlot != found) { in dequeueBuffer()
456 mCore->mActiveBuffers.insert(found); in dequeueBuffer()
458 *outSlot = found; in dequeueBuffer()
459 ATRACE_BUFFER_INDEX(found); in dequeueBuffer()
461 attachedByConsumer = mSlots[found].mNeedsReallocation; in dequeueBuffer()
462 mSlots[found].mNeedsReallocation = false; in dequeueBuffer()
464 mSlots[found].mBufferState.dequeue(); in dequeueBuffer()
469 mSlots[found].mAcquireCalled = false; in dequeueBuffer()
470 mSlots[found].mGraphicBuffer = nullptr; in dequeueBuffer()
471 mSlots[found].mRequestBufferCalled = false; in dequeueBuffer()
472 mSlots[found].mEglDisplay = EGL_NO_DISPLAY; in dequeueBuffer()
473 mSlots[found].mEglFence = EGL_NO_SYNC_KHR; in dequeueBuffer()
474 mSlots[found].mFence = Fence::NO_FENCE; in dequeueBuffer()
482 mCore->mBufferAge = mCore->mFrameCounter + 1 - mSlots[found].mFrameNumber; in dequeueBuffer()
488 if (CC_UNLIKELY(mSlots[found].mFence == nullptr)) { in dequeueBuffer()
491 found, buffer->width, buffer->height, buffer->format); in dequeueBuffer()
494 eglDisplay = mSlots[found].mEglDisplay; in dequeueBuffer()
495 eglFence = mSlots[found].mEglFence; in dequeueBuffer()
499 mCore->mSharedBufferSlot == found) ? in dequeueBuffer()
500 Fence::NO_FENCE : mSlots[found].mFence; in dequeueBuffer()
501 mSlots[found].mEglFence = EGL_NO_SYNC_KHR; in dequeueBuffer()
502 mSlots[found].mFence = Fence::NO_FENCE; in dequeueBuffer()
508 mCore->mSharedBufferSlot = found; in dequeueBuffer()
509 mSlots[found].mBufferState.mShared = true; in dequeueBuffer()
674 int found = mCore->mFreeBuffers.front(); in detachNextBuffer() local
675 mCore->mFreeBuffers.remove(found); in detachNextBuffer()
676 mCore->mFreeSlots.insert(found); in detachNextBuffer()
678 BQ_LOGV("detachNextBuffer detached slot %d", found); in detachNextBuffer()
680 *outBuffer = mSlots[found].mGraphicBuffer; in detachNextBuffer()
681 *outFence = mSlots[found].mFence; in detachNextBuffer()
682 mCore->clearBufferSlotLocked(found); in detachNextBuffer()
733 int found; in attachBuffer() local
734 status_t status = waitForFreeSlotThenRelock(FreeSlotCaller::Attach, lock, &found); in attachBuffer()
740 if (found == BufferQueueCore::INVALID_BUFFER_SLOT) { in attachBuffer()
745 *outSlot = found; in attachBuffer()
757 mCore->mActiveBuffers.insert(found); in attachBuffer()