Home
last modified time | relevance | path

Searched refs:GrowthPolicy (Results 1 – 5 of 5) sorted by relevance

/external/skia/src/gpu/
DGrBlockAllocator.cpp14 GrBlockAllocator::GrBlockAllocator(GrowthPolicy policy, size_t blockIncrementBytes, in GrBlockAllocator()
22 , fN0((policy == GrowthPolicy::kLinear || policy == GrowthPolicy::kExponential) ? 1 : 0) in GrBlockAllocator()
129 GrowthPolicy gp = static_cast<GrowthPolicy>(fGrowthPolicy); in releaseBlock()
130 if (fN0 > 0 && (fN1 > 1 || gp == GrowthPolicy::kFibonacci)) { in releaseBlock()
131 SkASSERT(gp != GrowthPolicy::kFixed); // fixed never needs undoing, fN0 always is 0 in releaseBlock()
132 if (gp == GrowthPolicy::kLinear) { in releaseBlock()
134 } else if (gp == GrowthPolicy::kFibonacci) { in releaseBlock()
140 SkASSERT(gp == GrowthPolicy::kExponential); in releaseBlock()
185 GrowthPolicy gp = static_cast<GrowthPolicy>(fGrowthPolicy); in reset()
186 fN0 = (gp == GrowthPolicy::kLinear || gp == GrowthPolicy::kExponential) ? 1 : 0; in reset()
[all …]
DGrBlockAllocator.h52 enum class GrowthPolicy : int { enum
59 static constexpr int kGrowthPolicyCount = static_cast<int>(GrowthPolicy::kLast) + 1;
176 GrBlockAllocator(GrowthPolicy policy, size_t blockIncrementBytes,
476 using GrowthPolicy = GrBlockAllocator::GrowthPolicy;
479 new (fStorage) GrBlockAllocator(GrowthPolicy::kFixed, N, N - sizeof(GrBlockAllocator)); in GrSBlockAllocator()
481 explicit GrSBlockAllocator(GrowthPolicy policy) { in GrSBlockAllocator()
485 GrSBlockAllocator(GrowthPolicy policy, size_t blockIncrementBytes) { in GrSBlockAllocator()
DGrMemoryPool.cpp34 : fAllocator(GrBlockAllocator::GrowthPolicy::kFixed, minAllocSize, in GrMemoryPool()
DGrTBlockList.h63 GrBlockAllocator::GrowthPolicy policy =
64 GrBlockAllocator::GrowthPolicy::kFixed)
/external/skia/tests/
DGrBlockAllocatorTest.cpp14 using GrowthPolicy = GrBlockAllocator::GrowthPolicy; typedef
69 GrBlockAllocator stack{GrowthPolicy::kFixed, 2048}; in DEF_TEST()
77 GrBlockAllocator* placement = new (mem) GrBlockAllocator(GrowthPolicy::kLinear, 1024, in DEF_TEST()
297 GrSBlockAllocator<kInitSize> pool{(GrowthPolicy) gp}; in DEF_TEST()
312 GrSBlockAllocator<kBlockIncrement> pool{GrowthPolicy::kLinear}; in DEF_TEST()
346 GrSBlockAllocator<1024> pool{(GrowthPolicy) gp}; in DEF_TEST()