• Home
  • Raw
  • Download

Lines Matching refs:fPtr

244     explicit SkAutoTMalloc(T* ptr = nullptr) : fPtr(ptr) {}  in fPtr()  function
248 : fPtr(count ? (T*)sk_malloc_throw(count, sizeof(T)) : nullptr) {} in SkAutoTMalloc()
255 fPtr.reset(count ? (T*)sk_realloc_throw(fPtr.release(), count * sizeof(T)) : nullptr); in realloc()
260 fPtr.reset(count ? (T*)sk_malloc_throw(count, sizeof(T)) : nullptr);
264 T* get() const { return fPtr.get(); } in get()
266 operator T*() { return fPtr.get(); }
268 operator const T*() const { return fPtr.get(); }
270 T& operator[](int index) { return fPtr.get()[index]; }
272 const T& operator[](int index) const { return fPtr.get()[index]; }
275 const T* data() const { return fPtr.get(); } in data()
276 T* data() { return fPtr.get(); } in data()
283 T* release() { return fPtr.release(); } in release()
286 std::unique_ptr<T, SkFunctionWrapper<void(void*), sk_free>> fPtr;
295 SkAutoSTMalloc() : fPtr(fTStorage) {} in SkAutoSTMalloc()
299 fPtr = (T*)sk_malloc_throw(count, sizeof(T)); in SkAutoSTMalloc()
301 fPtr = fTStorage; in SkAutoSTMalloc()
303 fPtr = nullptr; in SkAutoSTMalloc()
313 if (fPtr != fTStorage) { in ~SkAutoSTMalloc()
314 sk_free(fPtr); in ~SkAutoSTMalloc()
320 if (fPtr != fTStorage) { in reset()
321 sk_free(fPtr); in reset()
324 fPtr = (T*)sk_malloc_throw(count, sizeof(T)); in reset()
326 fPtr = fTStorage; in reset()
328 fPtr = nullptr; in reset()
330 return fPtr; in reset()
333 T* get() const { return fPtr; } in get()
336 return fPtr;
340 return fPtr;
344 return fPtr[index];
348 return fPtr[index];
352 const T* data() const { return fPtr; } in data()
353 T* data() { return fPtr; } in data()
358 if (fPtr == fTStorage) { in realloc()
359 fPtr = (T*)sk_malloc_throw(count, sizeof(T)); in realloc()
360 memcpy((void*)fPtr, fTStorage, kCount * sizeof(T)); in realloc()
362 fPtr = (T*)sk_realloc_throw(fPtr, count, sizeof(T)); in realloc()
365 if (fPtr != fTStorage) { in realloc()
366 fPtr = (T*)sk_realloc_throw(fPtr, count, sizeof(T)); in realloc()
387 T* fPtr; variable