Home | History | Annotate | Download | only in private

Lines Matching refs:fCount

18     SkTDArray() : fArray(nullptr), fReserve(0), fCount(0) {}
22 fReserve = fCount = 0;
27 fReserve = fCount = count;
30 SkTDArray(const SkTDArray<T>& src) : fArray(nullptr), fReserve(0), fCount(0) {
31 SkTDArray<T> tmp(src.fArray, src.fCount);
34 SkTDArray(SkTDArray<T>&& src) : fArray(nullptr), fReserve(0), fCount(0) {
43 if (src.fCount > fReserve) {
44 SkTDArray<T> tmp(src.fArray, src.fCount);
47 sk_careful_memcpy(fArray, src.fArray, sizeof(T) * src.fCount);
48 fCount = src.fCount;
62 return a.fCount == b.fCount &&
63 (a.fCount == 0 ||
64 !memcmp(a.fArray, b.fArray, a.fCount * sizeof(T)));
73 SkTSwap(fCount, other.fCount);
88 fReserve = fCount = 0;
92 bool isEmpty() const { return fCount == 0; }
97 int count() const { return fCount; }
109 size_t bytes() const { return fCount * sizeof(T); }
113 T* end() { return fArray ? fArray + fCount : nullptr; }
114 const T* end() const { return fArray ? fArray + fCount : nullptr; }
117 SkASSERT(index < fCount);
121 SkASSERT(index < fCount);
136 fReserve = fCount = 0;
138 SkASSERT(fReserve == 0 && fCount == 0);
144 fCount = 0;
158 fCount = count;
169 memmove(fArray + 1, fArray, (fCount - 1) * sizeof(T));
177 int oldCount = fCount;
201 SkASSERT(index <= fCount);
202 size_t oldCount = fCount;
213 SkASSERT(index + count <= fCount);
214 fCount = fCount - count;
215 memmove(fArray + index, fArray + index + count, sizeof(T) * (fCount - index));
219 SkASSERT(index < fCount);
220 int newCount = fCount - 1;
221 fCount = newCount;
229 const T* stop = fArray + fCount;
241 const T* stop = fArray + fCount;
252 const T* iter = fArray + fCount;
277 if (index >= fCount) {
280 int count = SkMin32(max, fCount - index);
286 this->copyRange(dst, 0, fCount);
292 const T& top() const { return (*this)[fCount - 1]; }
293 T& top() { return (*this)[fCount - 1]; }
294 void pop(T* elem) { SkASSERT(fCount > 0); if (elem) *elem = (*this)[fCount - 1]; --fCount; }
295 void pop() { SkASSERT(fCount > 0); --fCount; }
299 T* stop = fArray + fCount;
309 T* stop = fArray + fCount;
319 T* stop = fArray + fCount;
329 T* stop = fArray + fCount;
350 SkASSERT(fCount <= fReserve);
355 fReserve = fCount;
362 int fCount;
369 this->setCount(fCount + delta);
373 * Increase the storage allocation such that it can hold (fCount + extra)
378 * note: does NOT modify fCount