Flutter Engine
The Flutter Engine
Functions
SkContainers.cpp File Reference
#include "include/private/base/SkContainers.h"
#include "include/private/base/SkAlign.h"
#include "include/private/base/SkAssert.h"
#include "include/private/base/SkMalloc.h"
#include "include/private/base/SkTo.h"
#include <algorithm>
#include <cstddef>

Go to the source code of this file.

Functions

SkSpan< std::byte > sk_allocate_canfail (size_t size)
 
SkSpan< std::byte > sk_allocate_throw (size_t size)
 
void sk_report_container_overflow_and_die ()
 

Function Documentation

◆ sk_allocate_canfail()

SkSpan< std::byte > sk_allocate_canfail ( size_t  size)

Definition at line 62 of file SkContainers.cpp.

62 {
63 // Make sure to ask for at least the minimum number of bytes.
64 const size_t adjustedSize = std::max(size, kMinBytes);
65 void* ptr = sk_malloc_canfail(adjustedSize);
66 return complete_size(ptr, adjustedSize);
67}
static void * sk_malloc_canfail(size_t size)
Definition: SkMalloc.h:93
static float max(float r, float g, float b)
Definition: hsl.cpp:49
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
Definition: switches.h:259

◆ sk_allocate_throw()

SkSpan< std::byte > sk_allocate_throw ( size_t  size)

Definition at line 69 of file SkContainers.cpp.

69 {
70 if (size == 0) {
71 return {};
72 }
73 // Make sure to ask for at least the minimum number of bytes.
74 const size_t adjustedSize = std::max(size, kMinBytes);
75 void* ptr = sk_malloc_throw(adjustedSize);
76 return complete_size(ptr, adjustedSize);
77}
static void * sk_malloc_throw(size_t size)
Definition: SkMalloc.h:67

◆ sk_report_container_overflow_and_die()

void sk_report_container_overflow_and_die ( )

Definition at line 79 of file SkContainers.cpp.

79 {
80 SK_ABORT("Requested capacity is too large.");
81}
#define SK_ABORT(message,...)
Definition: SkAssert.h:70