struct BufferSlot {
    // mGraphicBuffer points to the buffer allocated for this slot or is NULL
    // if no buffer has been allocated.
    sp<GraphicBuffer> mGraphicBuffer;

// mEglDisplay is the EGLDisplay used to create EGLSyncKHR objects.
EGLDisplay mEglDisplay;

// mBufferState is the current state of this buffer slot.
BufferState mBufferState;

// mRequestBufferCalled is used for validating that the producer did
// call requestBuffer() when told to do so. Technically this is not
// needed but useful for debugging and catching producer bugs.
bool mRequestBufferCalled;
// mFrameNumber is the number of the queued frame for this slot.  This
// is used to dequeue buffers in LRU order (useful because buffers
// may be released before their release fence is signaled).
uint64_t mFrameNumber;

mFrameNumber 表示该 slot 分配 buffer 之后 queue 过的帧数,如果再分配,则重新计数。它已经不用在 dequeue 时的 LRU 排序。目前它只用在 BufferQueueConsumer::releaseBuffer() 中判断该 slot 中的 buffer 是否再分配过。

BufferQueueProducer::queueBuffer() 中,先更新 BufferQueueCore::mFrameCount 后再设置给 mFrameNumber

// mEglFence is the EGL sync object that must signal before the buffer
// associated with this buffer slot may be dequeued. It is initialized
// to EGL_NO_SYNC_KHR when the buffer is created and may be set to a
// new sync object in releaseBuffer.  (This is deprecated in favor of
// mFence, below.)
EGLSyncKHR mEglFence;

// mFence is a fence which will signal when work initiated by the
// previous owner of the buffer is finished. When the buffer is FREE,
// the fence indicates when the consumer has finished reading
// from the buffer, or when the producer has finished writing if it
// called cancelBuffer after queueing some writes. When the buffer is
// QUEUED, it indicates when the producer has finished filling the
// buffer. When the buffer is DEQUEUED or ACQUIRED, the fence has been
// passed to the consumer or producer along with ownership of the
// buffer, and mFence is set to NO_FENCE.
sp<Fence> mFence;

Fence 相关的以后单独写。