#include <SkContainers.h>
|
template<typename T > |
static constexpr size_t | RoundUp (size_t capacity) |
|
Definition at line 14 of file SkContainers.h.
◆ SkContainerAllocator()
SkContainerAllocator::SkContainerAllocator |
( |
size_t |
sizeOfT, |
|
|
int |
maxCapacity |
|
) |
| |
|
inline |
Definition at line 16 of file SkContainers.h.
17 : fSizeOfT{sizeOfT}
18 , fMaxCapacity{maxCapacity} {}
◆ allocate()
SkSpan< std::byte > SkContainerAllocator::allocate |
( |
int |
capacity, |
|
|
double |
growthFactor = 1.0 |
|
) |
| |
Definition at line 27 of file SkContainers.cpp.
27 {
31
32 if (growthFactor > 1.0 && capacity > 0) {
33 capacity = this->growthFactorCapacity(capacity, growthFactor);
34 }
35
37}
#define SkASSERT_RELEASE(cond)
SkSpan< std::byte > sk_allocate_throw(size_t size)
◆ RoundUp()
static constexpr size_t SkContainerAllocator::RoundUp |
( |
size_t |
capacity | ) |
|
|
inlinestaticconstexpr |
Definition at line 26 of file SkContainers.h.
26 {
27 return SkAlignTo(capacity *
sizeof(
T), kCapacityMultiple) /
sizeof(
T);
28 }
static constexpr size_t SkAlignTo(size_t x, size_t alignment)
◆ SkContainerAllocatorTestingPeer
The documentation for this class was generated from the following files: