21 char*
start() {
return (
char*)(
this + 1); }
22 const char*
start()
const {
return (
const char*)(
this + 1); }
33 , fInitialStorage(nullptr)
35 , fAllocCount(allocCount) {
37 fFrontBlock = fBackBlock =
nullptr;
38 fFront = fBack =
nullptr;
43 , fInitialStorage(storage)
45 , fAllocCount(allocCount) {
46 SkASSERT(storageSize == 0 || storage !=
nullptr);
50 fFrontBlock = (
Block*)storage;
51 fFrontBlock->
init(storageSize);
53 fFrontBlock =
nullptr;
55 fBackBlock = fFrontBlock;
56 fFront = fBack =
nullptr;
65 if (
head != initialHead) {
66 this->freeBlock(
head);
75 if (
nullptr == fFrontBlock) {
76 fFrontBlock = this->allocateBlock(fAllocCount);
77 fBackBlock = fFrontBlock;
80 Block* first = fFrontBlock;
83 if (
nullptr == first->
fBegin) {
89 if (begin < first->
start()) {
91 first = this->allocateBlock(fAllocCount);
92 first->
fNext = fFrontBlock;
93 fFrontBlock->
fPrev = first;
101 if (
nullptr == fFront) {
103 fFront = fBack =
begin;
115 if (
nullptr == fBackBlock) {
116 fBackBlock = this->allocateBlock(fAllocCount);
117 fFrontBlock = fBackBlock;
120 Block* last = fBackBlock;
123 if (
nullptr == last->
fBegin) {
131 last = this->allocateBlock(fAllocCount);
132 last->
fPrev = fBackBlock;
133 fBackBlock->
fNext = last;
142 if (
nullptr == fBack) {
144 fFront = fBack =
end;
157 Block* first = fFrontBlock;
161 if (first->
fBegin ==
nullptr) {
162 first = first->
fNext;
164 first->
fPrev =
nullptr;
165 this->freeBlock(fFrontBlock);
172 if (begin < fFrontBlock->fEnd) {
178 if (
nullptr == first->
fNext) {
179 fFront = fBack =
nullptr;
191 Block* last = fBackBlock;
195 if (last->
fEnd ==
nullptr) {
198 last->
fNext =
nullptr;
199 this->freeBlock(fBackBlock);
203 char*
end = last->
fEnd - fElemSize;
209 fBack = last->
fEnd - fElemSize;
212 if (
nullptr == last->
fPrev) {
213 fFront = fBack =
nullptr;
221int SkDeque::numBlocksAllocated()
const {
224 for (
const Block* temp = fFrontBlock; temp; temp = temp->fNext) {
233 newBlock->init(
sizeof(
Block) + allocCount * fElemSize);
237void SkDeque::freeBlock(
Block* block) {
246 this->
reset(d, startLoc);
257 if (
next == fCurBlock->fEnd) {
259 fCurBlock = fCurBlock->fNext;
260 }
while (fCurBlock !=
nullptr && fCurBlock->fBegin ==
nullptr);
261 next = fCurBlock ? fCurBlock->fBegin :
nullptr;
276 if (prev < fCurBlock->fBegin) {
278 fCurBlock = fCurBlock->fPrev;
279 }
while (fCurBlock !=
nullptr && fCurBlock->fEnd ==
nullptr);
280 prev = fCurBlock ? fCurBlock->fEnd - fElemSize :
nullptr;
293 fElemSize =
d.fElemSize;
295 if (kFront_IterStart == startLoc) {
297 fCurBlock =
d.fFrontBlock;
298 while (fCurBlock &&
nullptr == fCurBlock->fBegin) {
299 fCurBlock = fCurBlock->fNext;
301 fPos = fCurBlock ? fCurBlock->fBegin :
nullptr;
304 fCurBlock =
d.fBackBlock;
305 while (fCurBlock &&
nullptr == fCurBlock->fEnd) {
306 fCurBlock = fCurBlock->fPrev;
308 fPos = fCurBlock ? fCurBlock->fEnd - fElemSize :
nullptr;
static float next(float f)
static float prev(float f)
SK_API void sk_free(void *)
static void * sk_malloc_throw(size_t size)
void reset(const SkDeque &d, IterStart startLoc)
SkDeque(size_t elemSize, int allocCount=1)
static const char * begin(const StringSlice &s)
VULKAN_HPP_DEFAULT_DISPATCH_LOADER_DYNAMIC_STORAGE auto & d
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
const char * start() const