Lines Matching refs:allocator
46 * The platform allocator store provides basic allocator-types for the framework based on ion and
49 * \todo Provide allocator based on ashmem
51 * \todo Make this allocator store extendable
58 id_t id, std::shared_ptr<C2Allocator> *const allocator) override;
66 return "android.allocator-store";
74 /// returns a shared-singleton ion allocator
77 /// returns a shared-singleton gralloc allocator
80 /// returns a shared-singleton bufferqueue supporting gralloc allocator
94 id_t id, std::shared_ptr<C2Allocator> *const allocator) {
95 allocator->reset();
100 *allocator = fetchIonAllocator();
105 *allocator = fetchGrallocAllocator();
109 *allocator = fetchBufferQueueAllocator();
115 if (*allocator == nullptr) {
127 const std::shared_ptr<C2AllocatorIon> allocator,
176 allocator->setUsageMapper(mapper, minUsage, maxUsage, blockSize);
189 std::shared_ptr<C2AllocatorIon> allocator;
192 allocator = gIonAllocator.lock();
194 if (allocator) {
195 UseComponentStoreForIonAllocator(allocator, store);
201 std::shared_ptr<C2AllocatorIon> allocator = gIonAllocator.lock();
202 if (allocator == nullptr) {
208 allocator = std::make_shared<C2AllocatorIon>(C2PlatformAllocatorStore::ION);
209 UseComponentStoreForIonAllocator(allocator, componentStore);
210 gIonAllocator = allocator;
212 return allocator;
219 std::shared_ptr<C2Allocator> allocator = grallocAllocator.lock();
220 if (allocator == nullptr) {
221 allocator = std::make_shared<C2AllocatorGralloc>(C2PlatformAllocatorStore::GRALLOC);
222 grallocAllocator = allocator;
224 return allocator;
231 std::shared_ptr<C2Allocator> allocator = grallocAllocator.lock();
232 if (allocator == nullptr) {
233 allocator = std::make_shared<C2AllocatorGralloc>(
235 grallocAllocator = allocator;
237 return allocator;
269 // update platform allocator's store as well if it is alive
298 std::shared_ptr<C2Allocator> allocator;
305 C2AllocatorStore::DEFAULT_LINEAR, &allocator);
309 allocator, poolId);
318 C2AllocatorStore::DEFAULT_GRAPHIC, &allocator);
321 std::make_shared<C2PooledBlockPool>(allocator, poolId);
329 C2PlatformAllocatorStore::BUFFERQUEUE, &allocator);
333 allocator, poolId);
403 std::shared_ptr<C2Allocator> allocator;
414 res = allocatorStore->fetchAllocator(C2AllocatorStore::DEFAULT_LINEAR, &allocator);
416 *pool = std::make_shared<C2BasicLinearBlockPool>(allocator);
420 res = allocatorStore->fetchAllocator(C2AllocatorStore::DEFAULT_GRAPHIC, &allocator);
422 *pool = std::make_shared<C2BasicGraphicBlockPool>(allocator);