Lines Matching refs:heap
33 void GrD3DDescriptorTableManager::recycle(Heap* heap) {
34 // wrap the heap in an sk_sp and take ownership of it
35 sk_sp<Heap> wrappedHeap(heap);
37 SkASSERT(heap);
38 switch (heap->type()) {
54 std::unique_ptr<GrD3DDescriptorHeap> heap =
57 if (!heap) {
61 return sk_sp< GrD3DDescriptorTableManager::Heap>(new Heap(gpu, heap, type, descriptorCount));
84 sk_sp<Heap> heap = Heap::Make(gpu, fHeapType, fCurrentHeapDescriptorCount);
85 fDescriptorHeaps.push_back(heap);
91 // Any heap we can't allocate from gets removed from the list.
95 auto& heap = fDescriptorHeaps[fDescriptorHeaps.size() - 1];
96 if (heap->canAllocate(count)) {
97 if (!heap->used()) {
98 gpu->currentCommandList()->addRecycledResource(heap);
100 return heap->allocateTable(count);
102 // No space in current heap, pop off list
108 sk_sp<GrD3DDescriptorTableManager::Heap> heap =
110 gpu->currentCommandList()->addRecycledResource(heap);
111 fDescriptorHeaps.push_back(heap);
122 // Pop off the current descriptor heap
129 sk_sp<GrD3DDescriptorTableManager::Heap> heap =
131 fDescriptorHeaps.push_back(heap);
135 void GrD3DDescriptorTableManager::HeapPool::recycle(sk_sp<Heap> heap) {
136 SkASSERT(heap);
139 if (heap->descriptorCount() == fCurrentHeapDescriptorCount) {
140 heap->reset();
141 fDescriptorHeaps.push_back(heap);