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;
53 SkWriter32::Block* SkWriter32::doReserve(size_t size) {
56 Block* block = fTail;
57 SkASSERT(NULL == block || block->available() < size);
59 if (NULL == block) {
61 fHead = fTail = block = Block::Create(SkMax32(size, fMinSize));
66 fTail = Block::Create(SkMax32(size, fMinSize));
67 block->fNext = fTail;
68 block = fTail;
70 return block;
84 Block* block = fHead;
85 SkASSERT(NULL != block);
87 while (offset >= block->fAllocatedSoFar) {
88 offset -= block->fAllocatedSoFar;
89 block = block->fNext;
90 SkASSERT(NULL != block);
92 return block->peek32(offset);
118 Block* block = fHead;
119 SkASSERT(NULL != block);
120 while (offset >= block->fAllocatedSoFar) {
121 offset -= block->fAllocatedSoFar;
122 block = block->fNext;
123 SkASSERT(NULL != block);
129 // update the size on the "last" block
130 block->fAllocatedSoFar = offset;
132 fTail = block;
133 Block* next = block->fNext;
134 block->fNext = NULL;
136 block = next;
137 while (block) {
138 Block* next = block->fNext;
139 sk_free(block);
140 block = next;
147 const Block* block = fHead;
150 while (block) {
151 size_t allocated = block->fAllocatedSoFar;
152 memcpy(dst, block->base(), allocated);
154 block = block->fNext;
205 const Block* block = fHead;
206 while (block) {
207 if (!stream->write(block->base(), block->fAllocatedSoFar)) {
210 block = block->fNext;
220 const Block* block = fHead;
221 while (block) {
222 SkASSERT(SkIsAlign4(block->fSizeOfBlock));
223 SkASSERT(SkIsAlign4(block->fAllocatedSoFar));
224 SkASSERT(block->fAllocatedSoFar <= block->fSizeOfBlock);
225 if (NULL == block->fNext) {
226 SkASSERT(fTail == block);
229 accum += block->fAllocatedSoFar;
231 block = block->fNext;