Lines Matching refs:allocator
26 static void check_allocator_helper(GrTAllocator<C>* allocator, int cnt, int popCnt,
29 // Adds cnt items to the allocator, tests the cnts and iterators, pops popCnt items and checks
30 // again. Finally it resets the allocator and checks again.
31 static void check_allocator(GrTAllocator<C>* allocator, int cnt, int popCnt,
33 SkASSERT(allocator);
34 SkASSERT(allocator->empty());
38 allocator->push_back(C(i));
40 allocator->push_back() = C(i);
43 check_allocator_helper(allocator, cnt, popCnt, reporter);
44 allocator->reset();
45 check_allocator_helper(allocator, 0, 0, reporter);
48 // Checks that the allocator has the correct count, etc and that the element IDs are correct.
50 static void check_allocator_helper(GrTAllocator<C>* allocator, int cnt, int popCnt,
52 REPORTER_ASSERT(reporter, (0 == cnt) == allocator->empty());
53 REPORTER_ASSERT(reporter, cnt == allocator->count());
56 GrTAllocator<C>::Iter iter(allocator);
62 REPORTER_ASSERT(reporter, cnt-1 == allocator->back().fID);
67 allocator->pop_back();
69 check_allocator_helper(allocator, cnt - popCnt, 0, reporter);