Lines Matching refs:fCapacity
25 SkTDynamicHash() : fCount(0), fDeleted(0), fCapacity(0), fArray(nullptr) { in SkTDynamicHash()
40 SkASSERT(fCurrentIndex <= fHash->fCapacity); in done()
41 return fCurrentIndex == fHash->fCapacity; in done()
67 SkASSERT(fCurrentIndex <= fHash->fCapacity); in done()
68 return fCurrentIndex == fHash->fCapacity; in done()
92 for (int round = 0; round < fCapacity; round++) { in find()
93 SkASSERT(index >= 0 && index < fCapacity); in find()
103 SkASSERT(fCapacity == 0); in find()
124 sk_bzero(fArray, sizeof(T*)* fCapacity); in rewind()
133 fCapacity = 0; in reset()
141 int capacity() const { return fCapacity; } in capacity()
146 for (int round = 0; round < fCapacity; round++) { in countCollisions()
147 SkASSERT(index >= 0 && index < fCapacity); in countCollisions()
154 SkASSERT(fCapacity == 0); in countCollisions()
169 SKTDYNAMICHASH_CHECK(SkIsPow2(fCapacity)); in validate()
175 for (int i = 0; i < fCapacity; i++) { in validate()
190 for (int i = 0; i < fCapacity; i++) { in validate()
194 for (int j = i+1; j < fCapacity; j++) { in validate()
210 for (int round = 0; round < fCapacity; round++) { in innerAdd()
211 SkASSERT(index >= 0 && index < fCapacity); in innerAdd()
223 SkASSERT(fCapacity == 0); in innerAdd()
229 for (int round = 0; round < fCapacity; round++) { in innerRemove()
230 SkASSERT(index >= 0 && index < fCapacity); in innerRemove()
240 SkASSERT(fCapacity == 0); in innerRemove()
244 if (100 * (fCount + fDeleted + 1) > fCapacity * kGrowPercent) { in maybeGrow()
245 auto newCapacity = fCapacity > 0 ? fCapacity : 4; in maybeGrow()
260 int oldCapacity = fCapacity; in resize()
264 fCapacity = newCapacity; in resize()
265 fArray = (T**)sk_calloc_throw(sizeof(T*) * fCapacity); in resize()
277 uint32_t hashMask() const { return fCapacity - 1; } in hashMask()
294 int fCapacity; // Number of entries in fArray. Always a power of 2. variable