Lines Matching refs:block

26     Block* block = fHead;
29 SkASSERT(block);
30 // don't 'free' the first block, since it is owned by the caller
31 block = block->fNext;
33 while (block) {
34 Block* next = block->fNext;
35 sk_free(block);
36 block = next;
56 Block* block = fTail;
57 SkASSERT(NULL == block || block->available() < size);
59 if (NULL == block) {
61 fHead = fTail = block = Block::Create(SkMax32(size, fMinSize));
68 block->fNext = fTail;
69 block = fTail;
71 return block;
85 Block* block = fHead;
86 SkASSERT(NULL != block);
88 while (offset >= block->fAllocatedSoFar) {
89 offset -= block->fAllocatedSoFar;
90 block = block->fNext;
91 SkASSERT(NULL != block);
93 return block->peek32(offset);
119 Block* block = fHead;
120 SkASSERT(NULL != block);
121 while (offset >= block->fAllocatedSoFar) {
122 offset -= block->fAllocatedSoFar;
123 block = block->fNext;
124 SkASSERT(NULL != block);
130 // update the size on the "last" block
131 block->fAllocatedSoFar = offset;
133 fTail = block;
134 Block* next = block->fNext;
135 block->fNext = NULL;
137 block = next;
138 while (block) {
139 Block* next = block->fNext;
140 sk_free(block);
141 block = next;
148 const Block* block = fHead;
151 while (block) {
152 size_t allocated = block->fAllocatedSoFar;
153 memcpy(dst, block->base(), allocated);
155 block = block->fNext;
206 const Block* block = fHead;
207 while (block) {
208 if (!stream->write(block->base(), block->fAllocatedSoFar)) {
211 block = block->fNext;
221 const Block* block = fHead;
222 while (block) {
223 SkASSERT(SkIsAlign4(block->fSizeOfBlock));
224 SkASSERT(SkIsAlign4(block->fAllocatedSoFar));
225 SkASSERT(block->fAllocatedSoFar <= block->fSizeOfBlock);
226 if (NULL == block->fNext) {
227 SkASSERT(fTail == block);
230 accum += block->fAllocatedSoFar;
232 block = block->fNext;