Lines Matching refs:mBuffers

223     for (size_t i = 0; i < mBuffers.size(); ++i) {  in assignSlot()
224 if (mBuffers[i].clientBuffer == nullptr in assignSlot()
225 && mBuffers[i].compBuffer.expired()) { in assignSlot()
226 mBuffers[i].clientBuffer = buffer; in assignSlot()
230 mBuffers.push_back({ buffer, std::weak_ptr<C2Buffer>() }); in assignSlot()
231 return mBuffers.size() - 1; in assignSlot()
239 size_t index = mBuffers.size(); in releaseSlot()
240 for (size_t i = 0; i < mBuffers.size(); ++i) { in releaseSlot()
241 if (mBuffers[i].clientBuffer == buffer) { in releaseSlot()
242 clientBuffer = mBuffers[i].clientBuffer; in releaseSlot()
244 mBuffers[i].clientBuffer.clear(); in releaseSlot()
254 std::shared_ptr<C2Buffer> result = mBuffers[index].compBuffer.lock(); in releaseSlot()
257 mBuffers[index].compBuffer = result; in releaseSlot()
266 for (size_t i = 0; i < mBuffers.size(); ++i) { in expireComponentBuffer()
268 mBuffers[i].compBuffer.lock(); in expireComponentBuffer()
272 mBuffers[i].compBuffer.reset(); in expireComponentBuffer()
281 ALOGV("[%s] buffers are flushed %zu", mName, mBuffers.size()); in flush()
282 mBuffers.clear(); in flush()
287 mBuffers.begin(), mBuffers.end(), in numClientBuffers()
295 mBuffers.begin(), mBuffers.end(), in numComponentBuffers()
309 for (size_t i = 0; i < impl.mBuffers.size(); ++i) { in initialize()
310 sp<Codec2Buffer> clientBuffer = impl.mBuffers[i].clientBuffer; in initialize()
315 mBuffers.push_back({ clientBuffer, impl.mBuffers[i].compBuffer, ownedByClient }); in initialize()
317 ALOGV("[%s] converted %zu buffers to array mode of %zu", mName, mBuffers.size(), minSize); in initialize()
318 for (size_t i = impl.mBuffers.size(); i < minSize; ++i) { in initialize()
319 mBuffers.push_back({ allocate(), std::weak_ptr<C2Buffer>(), false }); in initialize()
330 for (size_t i = 0; i < mBuffers.size(); ++i) { in grabBuffer()
331 if (!mBuffers[i].ownedByClient && mBuffers[i].compBuffer.expired()) { in grabBuffer()
332 if (match(mBuffers[i].clientBuffer)) { in grabBuffer()
333 mBuffers[i].ownedByClient = true; in grabBuffer()
334 *buffer = mBuffers[i].clientBuffer; in grabBuffer()
352 size_t index = mBuffers.size(); in returnBuffer()
353 for (size_t i = 0; i < mBuffers.size(); ++i) { in returnBuffer()
354 if (mBuffers[i].clientBuffer == buffer) { in returnBuffer()
355 if (!mBuffers[i].ownedByClient) { in returnBuffer()
359 clientBuffer = mBuffers[i].clientBuffer; in returnBuffer()
361 mBuffers[i].ownedByClient = false; in returnBuffer()
372 std::shared_ptr<C2Buffer> result = mBuffers[index].compBuffer.lock(); in returnBuffer()
375 mBuffers[index].compBuffer = result; in returnBuffer()
384 for (size_t i = 0; i < mBuffers.size(); ++i) { in expireComponentBuffer()
386 mBuffers[i].compBuffer.lock(); in expireComponentBuffer()
391 if (mBuffers[i].ownedByClient) { in expireComponentBuffer()
396 mBuffers[i].compBuffer.reset(); in expireComponentBuffer()
407 for (const Entry &entry : mBuffers) { in getArray()
413 for (Entry &entry : mBuffers) { in flush()
419 size_t size = mBuffers.size(); in realloc()
420 mBuffers.clear(); in realloc()
422 mBuffers.push_back({ alloc(), std::weak_ptr<C2Buffer>(), false }); in realloc()
428 CHECK_LT(mBuffers.size(), newSize); in grow()
429 while (mBuffers.size() < newSize) { in grow()
430 mBuffers.push_back({ alloc(), std::weak_ptr<C2Buffer>(), false }); in grow()
436 mBuffers.begin(), mBuffers.end(), in numClientBuffers()
443 return mBuffers.size(); in arraySize()