Home
last modified time | relevance | path

Searched refs:GrBlockAllocator (Results 1 – 9 of 9) sorted by relevance

/external/skia/src/gpu/
DGrBlockAllocator.h46 class GrBlockAllocator final : SkNoncopyable {
125 friend class GrBlockAllocator;
176 GrBlockAllocator(GrowthPolicy policy, size_t blockIncrementBytes,
179 ~GrBlockAllocator() { this->reset(); } in ~GrBlockAllocator()
224 return sizeof(GrBlockAllocator) + fHead.fSize - BaseHeadBlockSize(); in preallocSize()
330 return const_cast<GrBlockAllocator*>(this)->owningBlock<Align, Padding>(ptr, start); in owningBlock()
339 return const_cast<GrBlockAllocator*>(this)->findOwningBlock(ptr); in findOwningBlock()
368 void stealHeapBlocks(GrBlockAllocator* other);
432 return sizeof(GrBlockAllocator) - offsetof(GrBlockAllocator, fHead); in BaseHeadBlockSize()
476 using GrowthPolicy = GrBlockAllocator::GrowthPolicy;
[all …]
DGrTBlockList.h16 using IndexFn = int (*)(const GrBlockAllocator::Block*);
17 using NextFn = int (*)(const GrBlockAllocator::Block*, int);
20 ItemFn<T, typename std::conditional<Const, const GrBlockAllocator::Block,
21 GrBlockAllocator::Block>::type> Resolve>
63 GrBlockAllocator::GrowthPolicy policy =
64 GrBlockAllocator::GrowthPolicy::kFixed)
66 GrBlockAllocator::BlockOverhead<alignof(T)>() + sizeof(T)*itemsPerBlock) {}
108 reserved * sizeof(T), GrBlockAllocator::kIgnoreExistingBytes_Flag); in reserve()
118 GrBlockAllocator::Block* block = fAllocator->currentBlock(); in pop_back()
232 GrBlockAllocator::Overhead<alignof(T)>() + StartingItems * sizeof(T);
[all …]
DGrBlockAllocator.cpp14 GrBlockAllocator::GrBlockAllocator(GrowthPolicy policy, size_t blockIncrementBytes, in GrBlockAllocator() function in GrBlockAllocator
31 GrBlockAllocator::Block::Block(Block* prev, int allocationSize) in Block()
44 GrBlockAllocator::Block::~Block() { in ~Block()
51 size_t GrBlockAllocator::totalSize() const { in totalSize()
53 size_t size = offsetof(GrBlockAllocator, fHead) + this->scratchBlockSize(); in totalSize()
61 size_t GrBlockAllocator::totalUsableSpace() const { in totalUsableSpace()
73 size_t GrBlockAllocator::totalSpaceInUse() const { in totalSpaceInUse()
82 GrBlockAllocator::Block* GrBlockAllocator::findOwningBlock(const void* p) { in findOwningBlock()
96 void GrBlockAllocator::releaseBlock(Block* block) { in releaseBlock()
150 void GrBlockAllocator::stealHeapBlocks(GrBlockAllocator* other) { in stealHeapBlocks()
[all …]
DGrMemoryPool.cpp26 (size_t) GrBlockAllocator::kMaxAllocationSize); in Make()
28 (size_t) GrBlockAllocator::kMaxAllocationSize); in Make()
34 : fAllocator(GrBlockAllocator::GrowthPolicy::kFixed, minAllocSize, in GrMemoryPool()
35 preallocSize - offsetof(GrMemoryPool, fAllocator) - sizeof(GrBlockAllocator)) { in GrMemoryPool()
66 GrBlockAllocator::ByteRange alloc = fAllocator.allocate<kAlignment, sizeof(Header)>(size); in allocate()
79 header->fSentinel = GrBlockAllocator::kAssignedMarker; in allocate()
103 SkASSERT(GrBlockAllocator::kAssignedMarker == header->fSentinel); in release()
104 header->fSentinel = GrBlockAllocator::kFreedMarker; in release()
112 GrBlockAllocator::Block* block = fAllocator.owningBlock<kAlignment>(header, header->fStart); in release()
DGrMemoryPool.h126 GrBlockAllocator fAllocator; // Must be the last field, in order to use extra allocated space
/external/skia/tests/
DGrBlockAllocatorTest.cpp13 using Block = GrBlockAllocator::Block;
14 using GrowthPolicy = GrBlockAllocator::GrowthPolicy;
54 GrBlockAllocator::Block* current = pool->currentBlock(); in add_block()
69 GrBlockAllocator stack{GrowthPolicy::kFixed, 2048}; in DEF_TEST()
72 REPORTER_ASSERT(r, stack.preallocSize() == sizeof(GrBlockAllocator)); in DEF_TEST()
77 GrBlockAllocator* placement = new (mem) GrBlockAllocator(GrowthPolicy::kLinear, 1024, in DEF_TEST()
78 1024 - sizeof(GrBlockAllocator)); in DEF_TEST()
81 placement->preallocUsableSpace() >= (1024 - sizeof(GrBlockAllocator))); in DEF_TEST()
89 inlined->preallocUsableSpace() >= (2048 - sizeof(GrBlockAllocator))); in DEF_TEST()
98 GrBlockAllocator::ByteRange br, in DEF_TEST()
[all …]
/external/skia/gn/
Dgpu.gni54 "$_src/gpu/GrBlockAllocator.cpp",
55 "$_src/gpu/GrBlockAllocator.h",
/external/skia/
DAndroid.bp435 "src/gpu/GrBlockAllocator.cpp",
1419 "src/gpu/GrBlockAllocator.cpp",
DBUILD.gn627 "src/gpu/GrBlockAllocator.cpp",