Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
SkArenaAllocWithReset Class Reference

#include <SkArenaAlloc.h>

Inheritance diagram for SkArenaAllocWithReset:
SkArenaAlloc SkSTArenaAllocWithReset< 512 > SkSTArenaAllocWithReset< 1024 *1024 > SkSTArenaAllocWithReset< kInitialArenaSize > SkSTArenaAllocWithReset< 4 *sizeof(skgpu::graphite::IntersectionTree)> SkSTArenaAllocWithReset< InlineStorageSize >

Public Member Functions

 SkArenaAllocWithReset (char *block, size_t blockSize, size_t firstHeapAllocation)
 
 SkArenaAllocWithReset (size_t firstHeapAllocation)
 
void reset ()
 
bool isEmpty ()
 
- Public Member Functions inherited from SkArenaAlloc
 SkArenaAlloc (char *block, size_t blockSize, size_t firstHeapAllocation)
 
 SkArenaAlloc (size_t firstHeapAllocation)
 
 SkArenaAlloc (const SkArenaAlloc &)=delete
 
SkArenaAllocoperator= (const SkArenaAlloc &)=delete
 
 SkArenaAlloc (SkArenaAlloc &&)=delete
 
SkArenaAllocoperator= (SkArenaAlloc &&)=delete
 
 ~SkArenaAlloc ()
 
template<typename Ctor >
auto make (Ctor &&ctor) -> decltype(ctor(nullptr))
 
template<typename T , typename... Args>
Tmake (Args &&... args)
 
template<typename T >
Tmake ()
 
template<typename T >
TmakeArrayDefault (size_t count)
 
template<typename T >
TmakeArray (size_t count)
 
template<typename T , typename Initializer >
TmakeInitializedArray (size_t count, Initializer initializer)
 
void * makeBytesAlignedTo (size_t size, size_t align)
 

Additional Inherited Members

- Protected Types inherited from SkArenaAlloc
using FooterAction = char *(char *)
 
- Protected Member Functions inherited from SkArenaAlloc
char * cursor ()
 
char * end ()
 

Detailed Description

Definition at line 307 of file SkArenaAlloc.h.

Constructor & Destructor Documentation

◆ SkArenaAllocWithReset() [1/2]

SkArenaAllocWithReset::SkArenaAllocWithReset ( char *  block,
size_t  blockSize,
size_t  firstHeapAllocation 
)

Definition at line 146 of file SkArenaAlloc.cpp.

149 : SkArenaAlloc(block, size, firstHeapAllocation)
150 , fFirstBlock{block}
151 , fFirstSize{SkToU32(size)}
152 , fFirstHeapAllocationSize{SkToU32(firstHeapAllocation)} {}
constexpr uint32_t SkToU32(S x)
Definition: SkTo.h:26
SkArenaAlloc(char *block, size_t blockSize, size_t firstHeapAllocation)
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

◆ SkArenaAllocWithReset() [2/2]

SkArenaAllocWithReset::SkArenaAllocWithReset ( size_t  firstHeapAllocation)
inlineexplicit

Definition at line 311 of file SkArenaAlloc.h.

312 : SkArenaAllocWithReset(nullptr, 0, firstHeapAllocation) {}
SkArenaAllocWithReset(char *block, size_t blockSize, size_t firstHeapAllocation)

Member Function Documentation

◆ isEmpty()

bool SkArenaAllocWithReset::isEmpty ( )

Definition at line 162 of file SkArenaAlloc.cpp.

162 {
163 return this->cursor() == nullptr ||
164 this->cursor() == fFirstBlock + sizeof(Footer);
165}
char * cursor()
Definition: SkArenaAlloc.h:215

◆ reset()

void SkArenaAllocWithReset::reset ( )

Definition at line 154 of file SkArenaAlloc.cpp.

154 {
155 char* const firstBlock = fFirstBlock;
156 const uint32_t firstSize = fFirstSize;
157 const uint32_t firstHeapAllocationSize = fFirstHeapAllocationSize;
159 new (this) SkArenaAllocWithReset{firstBlock, firstSize, firstHeapAllocationSize};
160}

The documentation for this class was generated from the following files: