Lines Matching refs:fBlocks
90 : fBlocks(8) in GrBufferAllocPool()
96 if (fBlocks.size()) { in deleteBlocks()
97 GrBuffer* buffer = fBlocks.back().fBuffer.get(); in deleteBlocks()
99 UNMAP_BUFFER(fBlocks.back()); in deleteBlocks()
102 while (!fBlocks.empty()) { in deleteBlocks()
125 BufferBlock& block = fBlocks.back(); in unmap()
132 this->flushCpuData(fBlocks.back(), flushSize); in unmap()
144 SkASSERT(!fBlocks.empty()); in validate()
145 const GrBuffer* buffer = fBlocks.back().fBuffer.get(); in validate()
149 } else if (!fBlocks.empty()) { in validate()
150 const GrBuffer* buffer = fBlocks.back().fBuffer.get(); in validate()
154 for (int i = 0; i < fBlocks.size() - 1; ++i) { in validate()
155 const GrBuffer* buffer = fBlocks[i].fBuffer.get(); in validate()
158 for (int i = 0; !wasDestroyed && i < fBlocks.size(); ++i) { in validate()
159 GrBuffer* buffer = fBlocks[i].fBuffer.get(); in validate()
163 size_t bytes = fBlocks[i].fBuffer->size() - fBlocks[i].fBytesFree; in validate()
172 SkASSERT((fBytesInUse && !fBlocks.empty()) || in validate()
173 (!fBytesInUse && (fBlocks.size() < 2))); in validate()
175 SkASSERT((0 == fBytesInUse) == fBlocks.empty()); in validate()
199 BufferBlock& back = fBlocks.back(); in makeSpace()
233 BufferBlock& back = fBlocks.back(); in makeSpace()
253 size_t usedBytes = (fBlocks.empty()) ? 0 : fBlocks.back().fBuffer->size() - in makeSpaceAtLeast()
254 fBlocks.back().fBytesFree; in makeSpaceAtLeast()
256 if (fBlocks.empty() || (minSize + pad) > fBlocks.back().fBytesFree) { in makeSpaceAtLeast()
270 fBlocks.back().fBytesFree -= pad; in makeSpaceAtLeast()
274 size_t size = align_down(fBlocks.back().fBytesFree, alignment); in makeSpaceAtLeast()
276 *buffer = fBlocks.back().fBuffer; in makeSpaceAtLeast()
278 fBlocks.back().fBytesFree -= size; in makeSpaceAtLeast()
289 SkASSERT(!fBlocks.empty()); in putBack()
290 BufferBlock& block = fBlocks.back(); in putBack()
318 BufferBlock& block = fBlocks.push_back(); in createBlock()
322 fBlocks.pop_back(); in createBlock()
328 SkASSERT(fBlocks.size() > 1); in createBlock()
329 BufferBlock& prev = fBlocks.fromBack(1); in createBlock()
366 SkASSERT(!fBlocks.empty()); in destroyBlock()
367 SkASSERT(fBlocks.back().fBuffer->isCpuBuffer() || in destroyBlock()
368 !static_cast<GrGpuBuffer*>(fBlocks.back().fBuffer.get())->isMapped()); in destroyBlock()
369 fBlocks.pop_back(); in destroyBlock()