Home
last modified time | relevance | path

Searched refs:preallocSize (Results 1 - 6 of 6) sorted by relevance

/third_party/skia/src/gpu/
H A DGrMemoryPool.cpp21 std::unique_ptr<GrMemoryPool> GrMemoryPool::Make(size_t preallocSize, size_t minAllocSize) { in Make() argument
24 preallocSize = SkTPin(preallocSize, kMinAllocationSize, in Make()
28 void* mem = operator new(preallocSize); in Make()
29 return std::unique_ptr<GrMemoryPool>(new (mem) GrMemoryPool(preallocSize, minAllocSize)); in Make()
32 GrMemoryPool::GrMemoryPool(size_t preallocSize, size_t minAllocSize) in GrMemoryPool() argument
34 preallocSize - offsetof(GrMemoryPool, fAllocator) - sizeof(SkBlockAllocator)) { in GrMemoryPool()
H A DGrMemoryPool.h50 static std::unique_ptr<GrMemoryPool> Make(size_t preallocSize, size_t minAllocSize);
68 // If size is the same as preallocSize, there aren't any heap blocks, so currentBlock() in isEmpty()
84 size_t size() const { return fAllocator.totalSize() - fAllocator.preallocSize(); } in size()
89 size_t preallocSize() const { in preallocSize() function in GrMemoryPool
91 return offsetof(GrMemoryPool, fAllocator) + fAllocator.preallocSize(); in preallocSize()
119 GrMemoryPool(size_t preallocSize, size_t minAllocSize);
/third_party/skia/tests/
H A DSkBlockAllocatorTest.cpp64 pool->template allocate<4>(pool->preallocSize() / 2); in add_block()
80 REPORTER_ASSERT(r, stack.preallocSize() == sizeof(SkBlockAllocator)); in DEF_TEST()
87 REPORTER_ASSERT(r, placement->preallocSize() == 1024); in DEF_TEST()
96 REPORTER_ASSERT(r, inlined->preallocSize() == 2048); in DEF_TEST()
151 REPORTER_ASSERT(r, total_size(pool) == pool->preallocSize()); in DEF_TEST()
164 REPORTER_ASSERT(r, total_size(pool) > pool->preallocSize()); in DEF_TEST()
343 REPORTER_ASSERT(r, pool->preallocSize() == pool->totalSize()); in DEF_TEST()
398 REPORTER_ASSERT(r, total_size(pool) == pool->preallocSize()); in DEF_TEST()
534 size_t theftSize = bSize - poolB->preallocSize(); in DEF_TEST()
540 REPORTER_ASSERT(r, poolB->preallocSize() in DEF_TEST()
[all...]
H A DGrMemoryPoolTest.cpp47 static void SetAllocator(size_t preallocSize, size_t minAllocSize) { in SetAllocator() argument
48 gPool = GrMemoryPool::Make(preallocSize, minAllocSize); in SetAllocator()
263 REPORTER_ASSERT(reporter, pool->preallocSize() == kSmallestMinAllocSize); in DEF_TEST()
275 // Pool allocates exactly preallocSize on creation. in DEF_TEST()
279 REPORTER_ASSERT(reporter, pool->preallocSize() == kPreallocSize); in DEF_TEST()
/third_party/skia/src/core/
H A DSkBlockAllocator.cpp57 SkASSERT(size >= this->preallocSize()); in totalSize()
H A DSkBlockAllocator.h229 size_t preallocSize() const { in preallocSize() function in final::GrowthPolicy
478 // N will be the preallocSize() reported by the allocator.

Completed in 5 milliseconds