Lines Matching refs:allocator
65 id_t id, std::shared_ptr<C2Allocator> *const allocator) override;
133 id_t id, std::shared_ptr<C2Allocator> *const allocator) { in fetchAllocator() argument
134 allocator->reset(); in fetchAllocator()
142 *allocator = fetchIonAllocator(); in fetchAllocator()
144 *allocator = fetchDmaBufAllocator(); in fetchAllocator()
149 *allocator = fetchGrallocAllocator(); in fetchAllocator()
153 *allocator = fetchBufferQueueAllocator(); in fetchAllocator()
157 *allocator = fetchBlobAllocator(); in fetchAllocator()
163 C2PlatformStorePluginLoader::GetInstance()->createAllocator(id, allocator); in fetchAllocator()
169 if (*allocator == nullptr) { in fetchAllocator()
183 const std::shared_ptr<C2AllocatorIon> allocator, in UseComponentStoreForIonAllocator() argument
232 allocator->setUsageMapper(mapper, minUsage, maxUsage, blockSize); in UseComponentStoreForIonAllocator()
235 void UseComponentStoreForDmaBufAllocator(const std::shared_ptr<C2DmaBufAllocator> allocator, in UseComponentStoreForDmaBufAllocator() argument
291 allocator->setUsageMapper(mapper, minUsage, maxUsage, blockSize); in UseComponentStoreForDmaBufAllocator()
304 std::shared_ptr<C2AllocatorIon> allocator; in setComponentStore() local
307 allocator = gIonAllocator.lock(); in setComponentStore()
309 if (allocator) { in setComponentStore()
310 UseComponentStoreForIonAllocator(allocator, store); in setComponentStore()
316 std::shared_ptr<C2AllocatorIon> allocator = gIonAllocator.lock(); in fetchIonAllocator() local
317 if (allocator == nullptr) { in fetchIonAllocator()
323 allocator = std::make_shared<C2AllocatorIon>(C2PlatformAllocatorStore::ION); in fetchIonAllocator()
324 UseComponentStoreForIonAllocator(allocator, componentStore); in fetchIonAllocator()
325 gIonAllocator = allocator; in fetchIonAllocator()
327 return allocator; in fetchIonAllocator()
332 std::shared_ptr<C2DmaBufAllocator> allocator = gDmaBufAllocator.lock(); in fetchDmaBufAllocator() local
333 if (allocator == nullptr) { in fetchDmaBufAllocator()
339 allocator = std::make_shared<C2DmaBufAllocator>(C2PlatformAllocatorStore::DMABUFHEAP); in fetchDmaBufAllocator()
340 UseComponentStoreForDmaBufAllocator(allocator, componentStore); in fetchDmaBufAllocator()
341 gDmaBufAllocator = allocator; in fetchDmaBufAllocator()
343 return allocator; in fetchDmaBufAllocator()
350 std::shared_ptr<C2Allocator> allocator = blobAllocator.lock(); in fetchBlobAllocator() local
351 if (allocator == nullptr) { in fetchBlobAllocator()
352 allocator = std::make_shared<C2AllocatorBlob>(C2PlatformAllocatorStore::BLOB); in fetchBlobAllocator()
353 blobAllocator = allocator; in fetchBlobAllocator()
355 return allocator; in fetchBlobAllocator()
362 std::shared_ptr<C2Allocator> allocator = grallocAllocator.lock(); in fetchGrallocAllocator() local
363 if (allocator == nullptr) { in fetchGrallocAllocator()
364 allocator = std::make_shared<C2AllocatorGralloc>(C2PlatformAllocatorStore::GRALLOC); in fetchGrallocAllocator()
365 grallocAllocator = allocator; in fetchGrallocAllocator()
367 return allocator; in fetchGrallocAllocator()
374 std::shared_ptr<C2Allocator> allocator = grallocAllocator.lock(); in fetchBufferQueueAllocator() local
375 if (allocator == nullptr) { in fetchBufferQueueAllocator()
376 allocator = std::make_shared<C2AllocatorGralloc>( in fetchBufferQueueAllocator()
378 grallocAllocator = allocator; in fetchBufferQueueAllocator()
380 return allocator; in fetchBufferQueueAllocator()
454 std::shared_ptr<C2Allocator> allocator; in _createBlockPool() local
469 C2PlatformAllocatorStore::ION, &allocator); in _createBlockPool()
472 new C2PooledBlockPool(allocator, poolId), deleter); in _createBlockPool()
482 C2PlatformAllocatorStore::BLOB, &allocator); in _createBlockPool()
485 new C2PooledBlockPool(allocator, poolId), deleter); in _createBlockPool()
496 C2AllocatorStore::DEFAULT_GRAPHIC, &allocator); in _createBlockPool()
499 new C2PooledBlockPool(allocator, poolId), deleter); in _createBlockPool()
509 C2PlatformAllocatorStore::BUFFERQUEUE, &allocator); in _createBlockPool()
512 new C2BufferQueueBlockPool(allocator, poolId), deleter); in _createBlockPool()
600 std::shared_ptr<C2Allocator> allocator; in GetCodec2BlockPool() local
609 res = allocatorStore->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &allocator); in GetCodec2BlockPool()
611 *pool = std::make_shared<C2BasicLinearBlockPool>(allocator); in GetCodec2BlockPool()
615 res = allocatorStore->fetchAllocator(C2AllocatorStore::DEFAULT_GRAPHIC, &allocator); in GetCodec2BlockPool()
617 *pool = std::make_shared<C2BasicGraphicBlockPool>(allocator); in GetCodec2BlockPool()