BufferQueueProducer::requestBuffer
返回刚才dequeue的slot对应的mGraphicBuffer
。
status_t BufferQueueProducer::requestBuffer(int slot, sp<GraphicBuffer>* buf) {
Mutex::Autolock lock(mCore->mMutex);
mSlots[slot].mRequestBufferCalled = true;
*buf = mSlots[slot].mGraphicBuffer;
return NO_ERROR;
}
典型用法