16constexpr size_t kMinBytes =
alignof(max_align_t);
32 if (growthFactor > 1.0 && capacity > 0) {
33 capacity = this->growthFactorCapacity(capacity, growthFactor);
39size_t SkContainerAllocator::roundUpCapacity(int64_t capacity)
const {
43 if (capacity < fMaxCapacity - kCapacityMultiple) {
44 return SkAlignTo(capacity, kCapacityMultiple);
50size_t SkContainerAllocator::growthFactorCapacity(
int capacity,
double growthFactor)
const {
55 const int64_t capacityGrowth =
static_cast<int64_t
>(capacity * growthFactor);
58 return this->roundUpCapacity(capacityGrowth);
66 return complete_size(ptr, adjustedSize);
76 return complete_size(ptr, adjustedSize);
80 SK_ABORT(
"Requested capacity is too large.");
static constexpr size_t SkAlignTo(size_t x, size_t alignment)
#define SK_ABORT(message,...)
#define SkASSERT_RELEASE(cond)
SkSpan< std::byte > sk_allocate_throw(size_t size)
void sk_report_container_overflow_and_die()
SkSpan< std::byte > sk_allocate_canfail(size_t size)
static void * sk_malloc_canfail(size_t size)
SK_API size_t sk_malloc_size(void *addr, size_t size)
static void * sk_malloc_throw(size_t size)
constexpr size_t SkToSizeT(S x)
SkSpan< std::byte > allocate(int capacity, double growthFactor=1.0)
static float max(float r, float g, float b)
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size