Lines Matching refs:fBlocks
92 : fBlocks(8) in GrBufferAllocPool()
98 if (fBlocks.count()) { in deleteBlocks()
99 GrBuffer* buffer = fBlocks.back().fBuffer.get(); in deleteBlocks()
101 UNMAP_BUFFER(fBlocks.back()); in deleteBlocks()
104 while (!fBlocks.empty()) { in deleteBlocks()
127 BufferBlock& block = fBlocks.back(); in unmap()
134 this->flushCpuData(fBlocks.back(), flushSize); in unmap()
146 SkASSERT(!fBlocks.empty()); in validate()
147 const GrBuffer* buffer = fBlocks.back().fBuffer.get(); in validate()
151 } else if (!fBlocks.empty()) { in validate()
152 const GrBuffer* buffer = fBlocks.back().fBuffer.get(); in validate()
156 for (int i = 0; i < fBlocks.count() - 1; ++i) { in validate()
157 const GrBuffer* buffer = fBlocks[i].fBuffer.get(); in validate()
160 for (int i = 0; !wasDestroyed && i < fBlocks.count(); ++i) { in validate()
161 GrBuffer* buffer = fBlocks[i].fBuffer.get(); in validate()
165 size_t bytes = fBlocks[i].fBuffer->size() - fBlocks[i].fBytesFree; in validate()
174 SkASSERT((fBytesInUse && !fBlocks.empty()) || in validate()
175 (!fBytesInUse && (fBlocks.count() < 2))); in validate()
177 SkASSERT((0 == fBytesInUse) == fBlocks.empty()); in validate()
201 BufferBlock& back = fBlocks.back(); in makeSpace()
235 BufferBlock& back = fBlocks.back(); in makeSpace()
255 size_t usedBytes = (fBlocks.empty()) ? 0 : fBlocks.back().fBuffer->size() - in makeSpaceAtLeast()
256 fBlocks.back().fBytesFree; in makeSpaceAtLeast()
258 if (fBlocks.empty() || (minSize + pad) > fBlocks.back().fBytesFree) { in makeSpaceAtLeast()
272 fBlocks.back().fBytesFree -= pad; in makeSpaceAtLeast()
276 size_t size = align_down(fBlocks.back().fBytesFree, alignment); in makeSpaceAtLeast()
278 *buffer = fBlocks.back().fBuffer; in makeSpaceAtLeast()
280 fBlocks.back().fBytesFree -= size; in makeSpaceAtLeast()
291 SkASSERT(!fBlocks.empty()); in putBack()
292 BufferBlock& block = fBlocks.back(); in putBack()
320 BufferBlock& block = fBlocks.push_back(); in createBlock()
324 fBlocks.pop_back(); in createBlock()
330 SkASSERT(fBlocks.count() > 1); in createBlock()
331 BufferBlock& prev = fBlocks.fromBack(1); in createBlock()
368 SkASSERT(!fBlocks.empty()); in destroyBlock()
369 SkASSERT(fBlocks.back().fBuffer->isCpuBuffer() || in destroyBlock()
370 !static_cast<GrGpuBuffer*>(fBlocks.back().fBuffer.get())->isMapped()); in destroyBlock()
371 fBlocks.pop_back(); in destroyBlock()