Lines Matching refs:fArray
21 SkTDArray() : fArray(nullptr), fReserve(0), fCount(0) {} in SkTDArray()
26 fArray = nullptr; in SkTDArray()
28 fArray = (T*)sk_malloc_throw(count * sizeof(T)); in SkTDArray()
29 memcpy(fArray, src, sizeof(T) * count); in SkTDArray()
34 SkTDArray(const SkTDArray<T>& src) : fArray(nullptr), fReserve(0), fCount(0) { in SkTDArray()
35 SkTDArray<T> tmp(src.fArray, src.fCount); in SkTDArray()
38 SkTDArray(SkTDArray<T>&& src) : fArray(nullptr), fReserve(0), fCount(0) { in SkTDArray()
42 sk_free(fArray); in ~SkTDArray()
48 SkTDArray<T> tmp(src.fArray, src.fCount);
51 sk_careful_memcpy(fArray, src.fArray, sizeof(T) * src.fCount);
68 !memcmp(a.fArray, b.fArray, a.fCount * sizeof(T)));
76 swap(fArray, that.fArray); in swap()
102 T* begin() { return fArray; } in begin()
103 const T* begin() const { return fArray; } in begin()
104 T* end() { return fArray ? fArray + fCount : nullptr; } in end()
105 const T* end() const { return fArray ? fArray + fCount : nullptr; } in end()
109 return fArray[index];
113 return fArray[index];
122 if (fArray) { in reset()
123 sk_free(fArray); in reset()
124 fArray = nullptr; in reset()
163 memmove(fArray + 1, fArray, (fCount - 1) * sizeof(T)); in prepend()
164 return fArray; in prepend()
173 SkASSERT(src == nullptr || fArray == nullptr ||
174 src + count <= fArray || fArray + oldCount <= src);
178 memcpy(fArray + oldCount, src, sizeof(T) * count);
181 return fArray + oldCount;
192 T* dst = fArray + index;
203 memmove(fArray + index, fArray + index + count, sizeof(T) * (fCount - index));
211 memcpy(fArray + index, fArray + newCount, sizeof(T)); in removeShuffle()
216 const T* iter = fArray; in find()
217 const T* stop = fArray + fCount; in find()
221 return SkToInt(iter - fArray); in find()
228 const T* iter = fArray + fCount; in rfind()
229 const T* stop = fArray; in rfind()
257 memcpy(dst, fArray + index, sizeof(T) * count); in copyRange()
274 T* iter = fArray; in deleteAll()
275 T* stop = fArray + fCount; in deleteAll()
284 T* iter = fArray; in freeAll()
285 T* stop = fArray + fCount; in freeAll()
294 T* iter = fArray; in unrefAll()
295 T* stop = fArray + fCount; in unrefAll()
304 T* iter = fArray; in safeUnrefAll()
305 T* stop = fArray + fCount; in safeUnrefAll()
315 SkASSERT((fReserve == 0 && fArray == nullptr) || in validate()
316 (fReserve > 0 && fArray != nullptr)); in validate()
323 fArray = (T*)sk_realloc_throw(fArray, fReserve * sizeof(T)); in shrinkToFit()
327 T* fArray;
364 fArray = (T*)sk_realloc_throw(fArray, fReserve * sizeof(T)); in resizeStorageToAtLeast()