ReleaseBufferCallback TransactionCompletedListener::popReleaseBufferCallbackLocked(
const ReleaseCallbackId& callbackId) {
ReleaseBufferCallback callback;
auto itr = mReleaseBufferCallbacks.find(callbackId);
if (itr == mReleaseBufferCallbacks.end()) {
return nullptr;
}
callback = itr->second;
mReleaseBufferCallbacks.erase(itr);
return callback;
}
mReleaseBufferCallbacks
查找 callbackId
对应的 ReleaseCallbackId。mReleaseBufferCallbacks
移除该元素并返回。mReleaseBufferCallbacks
。