Lines Matching refs:fCapacity
25 SkTDynamicHash() : fCount(0), fDeleted(0), fCapacity(0), fArray(nullptr) {
40 SkASSERT(fCurrentIndex <= fHash->fCapacity);
41 return fCurrentIndex == fHash->fCapacity;
67 SkASSERT(fCurrentIndex <= fHash->fCapacity);
68 return fCurrentIndex == fHash->fCapacity;
92 for (int round = 0; round < fCapacity; round++) {
93 SkASSERT(index >= 0 && index < fCapacity);
103 SkASSERT(fCapacity == 0);
124 sk_bzero(fArray, sizeof(T*)* fCapacity);
133 fCapacity = 0;
141 int capacity() const { return fCapacity; }
146 for (int round = 0; round < fCapacity; round++) {
147 SkASSERT(index >= 0 && index < fCapacity);
154 SkASSERT(fCapacity == 0);
169 SKTDYNAMICHASH_CHECK(SkIsPow2(fCapacity));
175 for (int i = 0; i < fCapacity; i++) {
190 for (int i = 0; i < fCapacity; i++) {
194 for (int j = i+1; j < fCapacity; j++) {
210 for (int round = 0; round < fCapacity; round++) {
211 SkASSERT(index >= 0 && index < fCapacity);
223 SkASSERT(fCapacity == 0);
229 for (int round = 0; round < fCapacity; round++) {
230 SkASSERT(index >= 0 && index < fCapacity);
240 SkASSERT(fCapacity == 0);
244 if (100 * (fCount + fDeleted + 1) > fCapacity * kGrowPercent) {
245 this->resize(fCapacity > 0 ? fCapacity * 2 : 4);
251 int oldCapacity = fCapacity;
255 fCapacity = newCapacity;
256 fArray = (T**)sk_calloc_throw(sizeof(T*) * fCapacity);
267 // fCapacity is always a power of 2, so this masks the correct low bits to index into our hash.
268 uint32_t hashMask() const { return fCapacity - 1; }
285 int fCapacity; // Number of entries in fArray. Always a power of 2.