Lines Matching refs:found

274         std::unique_lock<std::mutex>& lock, int* found) const {  in waitForFreeSlotThenRelock()
309 *found = BufferQueueCore::INVALID_BUFFER_SLOT; in waitForFreeSlotThenRelock()
326 *found = mCore->mSharedBufferSlot; in waitForFreeSlotThenRelock()
332 *found = slot; in waitForFreeSlotThenRelock()
334 *found = getFreeSlotLocked(); in waitForFreeSlotThenRelock()
340 *found = slot; in waitForFreeSlotThenRelock()
342 *found = getFreeBufferLocked(); in waitForFreeSlotThenRelock()
351 tryAgain = (*found == BufferQueueCore::INVALID_BUFFER_SLOT) || in waitForFreeSlotThenRelock()
440 int found = BufferItem::INVALID_BUFFER_SLOT; in dequeueBuffer() local
441 while (found == BufferItem::INVALID_BUFFER_SLOT) { in dequeueBuffer()
442 status_t status = waitForFreeSlotThenRelock(FreeSlotCaller::Dequeue, lock, &found); in dequeueBuffer()
448 if (found == BufferQueueCore::INVALID_BUFFER_SLOT) { in dequeueBuffer()
453 const sp<GraphicBuffer>& buffer(mSlots[found].mGraphicBuffer); in dequeueBuffer()
461 if (mCore->mSharedBufferSlot == found) { in dequeueBuffer()
465 mCore->mFreeSlots.insert(found); in dequeueBuffer()
466 mCore->clearBufferSlotLocked(found); in dequeueBuffer()
467 found = BufferItem::INVALID_BUFFER_SLOT; in dequeueBuffer()
473 const sp<GraphicBuffer>& buffer(mSlots[found].mGraphicBuffer); in dequeueBuffer()
474 if (mCore->mSharedBufferSlot == found && in dequeueBuffer()
482 if (mCore->mSharedBufferSlot != found) { in dequeueBuffer()
483 mCore->mActiveBuffers.insert(found); in dequeueBuffer()
485 *outSlot = found; in dequeueBuffer()
486 ATRACE_BUFFER_INDEX(found); in dequeueBuffer()
488 attachedByConsumer = mSlots[found].mNeedsReallocation; in dequeueBuffer()
489 mSlots[found].mNeedsReallocation = false; in dequeueBuffer()
491 mSlots[found].mBufferState.dequeue(); in dequeueBuffer()
496 mSlots[found].mAcquireCalled = false; in dequeueBuffer()
497 mSlots[found].mGraphicBuffer = nullptr; in dequeueBuffer()
498 mSlots[found].mRequestBufferCalled = false; in dequeueBuffer()
499 mSlots[found].mEglDisplay = EGL_NO_DISPLAY; in dequeueBuffer()
500 mSlots[found].mEglFence = EGL_NO_SYNC_KHR; in dequeueBuffer()
501 mSlots[found].mFence = Fence::NO_FENCE; in dequeueBuffer()
509 mCore->mBufferAge = mCore->mFrameCounter + 1 - mSlots[found].mFrameNumber; in dequeueBuffer()
515 if (CC_UNLIKELY(mSlots[found].mFence == nullptr)) { in dequeueBuffer()
518 found, buffer->width, buffer->height, buffer->format); in dequeueBuffer()
521 eglDisplay = mSlots[found].mEglDisplay; in dequeueBuffer()
522 eglFence = mSlots[found].mEglFence; in dequeueBuffer()
526 mCore->mSharedBufferSlot == found) ? in dequeueBuffer()
527 Fence::NO_FENCE : mSlots[found].mFence; in dequeueBuffer()
528 mSlots[found].mEglFence = EGL_NO_SYNC_KHR; in dequeueBuffer()
529 mSlots[found].mFence = Fence::NO_FENCE; in dequeueBuffer()
535 mCore->mSharedBufferSlot = found; in dequeueBuffer()
536 mSlots[found].mBufferState.mShared = true; in dequeueBuffer()
715 int found = mCore->mFreeBuffers.front(); in detachNextBuffer() local
716 mCore->mFreeBuffers.remove(found); in detachNextBuffer()
717 mCore->mFreeSlots.insert(found); in detachNextBuffer()
719 BQ_LOGV("detachNextBuffer detached slot %d", found); in detachNextBuffer()
721 *outBuffer = mSlots[found].mGraphicBuffer; in detachNextBuffer()
722 *outFence = mSlots[found].mFence; in detachNextBuffer()
723 mCore->clearBufferSlotLocked(found); in detachNextBuffer()
774 int found; in attachBuffer() local
775 status_t status = waitForFreeSlotThenRelock(FreeSlotCaller::Attach, lock, &found); in attachBuffer()
781 if (found == BufferQueueCore::INVALID_BUFFER_SLOT) { in attachBuffer()
786 *outSlot = found; in attachBuffer()
798 mCore->mActiveBuffers.insert(found); in attachBuffer()