Lines Matching refs:SkData
16 SkData::SkData(const void* ptr, size_t size, ReleaseProc proc, void* context) in SkData() function in SkData
26 SkData::SkData(size_t size) in SkData() function in SkData
33 SkData::~SkData() { in ~SkData()
39 bool SkData::equals(const SkData* other) const { in equals()
49 size_t SkData::copyRange(size_t offset, size_t length, void* buffer) const { in copyRange()
64 void SkData::operator delete(void* p) { in operator delete()
68 sk_sp<SkData> SkData::PrivateNewWithCopy(const void* srcOrNull, size_t length) { in PrivateNewWithCopy()
70 return SkData::MakeEmpty(); in PrivateNewWithCopy()
73 const size_t actualLength = length + sizeof(SkData); in PrivateNewWithCopy()
77 sk_sp<SkData> data(new (storage) SkData(length)); in PrivateNewWithCopy()
84 void SkData::DummyReleaseProc(const void*, void*) {} in DummyReleaseProc()
88 sk_sp<SkData> SkData::MakeEmpty() { in MakeEmpty()
90 static SkData* empty; in MakeEmpty()
92 once([]{ empty = new SkData(nullptr, 0, nullptr, nullptr); }); in MakeEmpty()
101 sk_sp<SkData> SkData::MakeFromMalloc(const void* data, size_t length) { in MakeFromMalloc()
102 return sk_sp<SkData>(new SkData(data, length, sk_free_releaseproc, nullptr)); in MakeFromMalloc()
105 sk_sp<SkData> SkData::MakeWithCopy(const void* src, size_t length) { in MakeWithCopy()
110 sk_sp<SkData> SkData::MakeUninitialized(size_t length) { in MakeUninitialized()
114 sk_sp<SkData> SkData::MakeWithProc(const void* ptr, size_t length, ReleaseProc proc, void* ctx) { in MakeWithProc()
115 return sk_sp<SkData>(new SkData(ptr, length, proc, ctx)); in MakeWithProc()
124 sk_sp<SkData> SkData::MakeFromFILE(FILE* f) { in MakeFromFILE()
131 return SkData::MakeWithProc(addr, size, sk_mmap_releaseproc, reinterpret_cast<void*>(size)); in MakeFromFILE()
134 sk_sp<SkData> SkData::MakeFromFileName(const char path[]) { in MakeFromFileName()
144 sk_sp<SkData> SkData::MakeFromFD(int fd) { in MakeFromFD()
150 return SkData::MakeWithProc(addr, size, sk_mmap_releaseproc, reinterpret_cast<void*>(size)); in MakeFromFD()
155 SkData* src = reinterpret_cast<SkData*>(context); in sk_dataref_releaseproc()
159 sk_sp<SkData> SkData::MakeSubset(const SkData* src, size_t offset, size_t length) { in MakeSubset()
168 return SkData::MakeEmpty(); in MakeSubset()
177 return sk_sp<SkData>(new SkData(src->bytes() + offset, length, sk_dataref_releaseproc, in MakeSubset()
178 const_cast<SkData*>(src))); in MakeSubset()
181 sk_sp<SkData> SkData::MakeWithCString(const char cstr[]) { in MakeWithCString()
194 sk_sp<SkData> SkData::MakeFromStream(SkStream* stream, size_t size) { in MakeFromStream()
195 sk_sp<SkData> data(SkData::MakeUninitialized(size)); in MakeFromStream()