Lines Matching refs:slot

50 status_t BufferQueueProducer::requestBuffer(int slot, sp<GraphicBuffer>* buf) {  in requestBuffer()  argument
52 BQ_LOGV("requestBuffer: slot %d", slot); in requestBuffer()
60 if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) { in requestBuffer()
62 slot, BufferQueueDefs::NUM_BUFFER_SLOTS); in requestBuffer()
64 } else if (mSlots[slot].mBufferState != BufferSlot::DEQUEUED) { in requestBuffer()
66 "(state = %d)", slot, mSlots[slot].mBufferState); in requestBuffer()
70 mSlots[slot].mRequestBufferCalled = true; in requestBuffer()
71 *buf = mSlots[slot].mGraphicBuffer; in requestBuffer()
390 status_t BufferQueueProducer::detachBuffer(int slot) { in detachBuffer() argument
392 ATRACE_BUFFER_INDEX(slot); in detachBuffer()
393 BQ_LOGV("detachBuffer(P): slot %d", slot); in detachBuffer()
401 if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) { in detachBuffer()
403 slot, BufferQueueDefs::NUM_BUFFER_SLOTS); in detachBuffer()
405 } else if (mSlots[slot].mBufferState != BufferSlot::DEQUEUED) { in detachBuffer()
407 "(state = %d)", slot, mSlots[slot].mBufferState); in detachBuffer()
409 } else if (!mSlots[slot].mRequestBufferCalled) { in detachBuffer()
411 slot); in detachBuffer()
415 mCore->freeBufferLocked(slot); in detachBuffer()
512 status_t BufferQueueProducer::queueBuffer(int slot, in queueBuffer() argument
515 ATRACE_BUFFER_INDEX(slot); in queueBuffer()
568 if (slot < 0 || slot >= maxBufferCount) { in queueBuffer()
570 slot, maxBufferCount); in queueBuffer()
572 } else if (mSlots[slot].mBufferState != BufferSlot::DEQUEUED) { in queueBuffer()
574 "(state = %d)", slot, mSlots[slot].mBufferState); in queueBuffer()
576 } else if (!mSlots[slot].mRequestBufferCalled) { in queueBuffer()
578 "a buffer", slot); in queueBuffer()
584 slot, mCore->mFrameCounter + 1, timestamp, in queueBuffer()
588 const sp<GraphicBuffer>& graphicBuffer(mSlots[slot].mGraphicBuffer); in queueBuffer()
594 "buffer in slot %d", slot); in queueBuffer()
598 mSlots[slot].mFence = fence; in queueBuffer()
599 mSlots[slot].mBufferState = BufferSlot::QUEUED; in queueBuffer()
601 mSlots[slot].mFrameNumber = mCore->mFrameCounter; in queueBuffer()
603 item.mAcquireCalled = mSlots[slot].mAcquireCalled; in queueBuffer()
604 item.mGraphicBuffer = mSlots[slot].mGraphicBuffer; in queueBuffer()
613 item.mSlot = slot; in queueBuffer()
693 void BufferQueueProducer::cancelBuffer(int slot, const sp<Fence>& fence) { in cancelBuffer() argument
695 BQ_LOGV("cancelBuffer: slot %d", slot); in cancelBuffer()
703 if (slot < 0 || slot >= BufferQueueDefs::NUM_BUFFER_SLOTS) { in cancelBuffer()
705 slot, BufferQueueDefs::NUM_BUFFER_SLOTS); in cancelBuffer()
707 } else if (mSlots[slot].mBufferState != BufferSlot::DEQUEUED) { in cancelBuffer()
709 "(state = %d)", slot, mSlots[slot].mBufferState); in cancelBuffer()
716 mSlots[slot].mBufferState = BufferSlot::FREE; in cancelBuffer()
717 mSlots[slot].mFrameNumber = 0; in cancelBuffer()
718 mSlots[slot].mFence = fence; in cancelBuffer()
921 for (int slot = 0; slot < BufferQueueDefs::NUM_BUFFER_SLOTS; ++slot) { in allocateBuffers() local
922 if (mSlots[slot].mGraphicBuffer != NULL) { in allocateBuffers()
925 if (mSlots[slot].mBufferState != BufferSlot::FREE) { in allocateBuffers()
927 slot); in allocateBuffers()
931 freeSlots.push_back(slot); in allocateBuffers()
985 int slot = freeSlots[i]; in allocateBuffers() local
986 if (mSlots[slot].mBufferState != BufferSlot::FREE) { in allocateBuffers()
990 "Dropping allocated buffer.", slot); in allocateBuffers()
993 mCore->freeBufferLocked(slot); // Clean up the slot first in allocateBuffers()
994 mSlots[slot].mGraphicBuffer = buffers[i]; in allocateBuffers()
995 mSlots[slot].mFrameNumber = 0; in allocateBuffers()
996 mSlots[slot].mFence = Fence::NO_FENCE; in allocateBuffers()
997 BQ_LOGV("allocateBuffers: allocated a new buffer in slot %d", slot); in allocateBuffers()