#include <SkArenaAlloc.h>
Definition at line 105 of file SkArenaAlloc.h.
◆ FooterAction
◆ SkArenaAlloc() [1/4]
SkArenaAlloc::SkArenaAlloc |
( |
char * |
block, |
|
|
size_t |
blockSize, |
|
|
size_t |
firstHeapAllocation |
|
) |
| |
Definition at line 18 of file SkArenaAlloc.cpp.
19 : fDtorCursor {block}
20 , fCursor {block}
23{
24 if (
size <
sizeof(Footer)) {
25 fEnd = fCursor = fDtorCursor = nullptr;
26 }
27
28 if (fCursor != nullptr) {
31 }
32}
static void sk_asan_poison_memory_region(void const volatile *addr, size_t size)
static char * end_chain(char *)
constexpr uint32_t SkToU32(S x)
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
◆ SkArenaAlloc() [2/4]
SkArenaAlloc::SkArenaAlloc |
( |
size_t |
firstHeapAllocation | ) |
|
|
inlineexplicit |
Definition at line 109 of file SkArenaAlloc.h.
SkArenaAlloc(char *block, size_t blockSize, size_t firstHeapAllocation)
◆ SkArenaAlloc() [3/4]
◆ SkArenaAlloc() [4/4]
◆ ~SkArenaAlloc()
SkArenaAlloc::~SkArenaAlloc |
( |
| ) |
|
◆ cursor()
char * SkArenaAlloc::cursor |
( |
| ) |
|
|
inlineprotected |
◆ end()
char * SkArenaAlloc::end |
( |
| ) |
|
|
inlineprotected |
◆ make() [1/3]
T * SkArenaAlloc::make |
( |
| ) |
|
|
inline |
Definition at line 158 of file SkArenaAlloc.h.
158 {
160
162 } else {
163
164 return this->
make([&](
void* objStart) {
165 return new(objStart)
T();
166 });
167 }
168 }
void * makeBytesAlignedTo(size_t size, size_t align)
◆ make() [2/3]
template<typename
T , typename... Args>
T * SkArenaAlloc::make |
( |
Args &&... |
args | ) |
|
|
inline |
Definition at line 151 of file SkArenaAlloc.h.
151 {
152 return this->
make([&](
void* objStart) {
153 return new(objStart)
T(std::forward<Args>(
args)...);
154 });
155 }
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
◆ make() [3/3]
template<typename Ctor >
auto SkArenaAlloc::make |
( |
Ctor && |
ctor | ) |
-> decltype(ctor(nullptr)) |
|
inline |
Definition at line 120 of file SkArenaAlloc.h.
120 {
121 using T = std::remove_pointer_t<
decltype(ctor(
nullptr))>;
122
124 uint32_t alignment =
SkToU32(
alignof(
T));
125 char* objStart;
127 objStart = this->allocObject(
size, alignment);
128 fCursor = objStart +
size;
130 } else {
131 objStart = this->allocObjectWithFooter(
size +
sizeof(Footer), alignment);
132
133 uint32_t padding =
SkToU32(objStart - fCursor);
134
135
136 fCursor = objStart +
size;
139 char* objStart = objEnd - (
sizeof(
T) +
sizeof(Footer));
140 ((
T*)objStart)->~T();
141 return objStart;
142 };
143 this->installFooter(releaser, padding);
144 }
145
146
147 return ctor(objStart);
148 }
static void sk_asan_unpoison_memory_region(void const volatile *addr, size_t size)
char *(char *) FooterAction
◆ makeArray()
T * SkArenaAlloc::makeArray |
( |
size_t |
count | ) |
|
|
inline |
Definition at line 181 of file SkArenaAlloc.h.
181 {
182 T* array = this->allocUninitializedArray<T>(
count);
183 for (
size_t i = 0;
i <
count;
i++) {
184
186 }
187 return array;
188 }
◆ makeArrayDefault()
T * SkArenaAlloc::makeArrayDefault |
( |
size_t |
count | ) |
|
|
inline |
Definition at line 171 of file SkArenaAlloc.h.
171 {
172 T* array = this->allocUninitializedArray<T>(
count);
173 for (
size_t i = 0;
i <
count;
i++) {
174
176 }
177 return array;
178 }
◆ makeBytesAlignedTo()
void * SkArenaAlloc::makeBytesAlignedTo |
( |
size_t |
size, |
|
|
size_t |
align |
|
) |
| |
|
inline |
Definition at line 200 of file SkArenaAlloc.h.
200 {
201 AssertRelease(SkTFitsIn<uint32_t>(
size));
203 fCursor = objStart +
size;
205 return objStart;
206 }
◆ makeInitializedArray()
T * SkArenaAlloc::makeInitializedArray |
( |
size_t |
count, |
|
|
Initializer |
initializer |
|
) |
| |
|
inline |
Definition at line 191 of file SkArenaAlloc.h.
191 {
192 T* array = this->allocUninitializedArray<T>(
count);
193 for (
size_t i = 0;
i <
count;
i++) {
195 }
196 return array;
197 }
static struct Initializer initializer
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following files: