Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Unified Diff: src/core/SkReadBuffer.h

Issue 1779263003: Make sp variants for SkData (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPixmap.cpp ('k') | src/core/SkReader32.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkReadBuffer.h
diff --git a/src/core/SkReadBuffer.h b/src/core/SkReadBuffer.h
index 5db9f4644d46b2bfc9d5dc5fa103f26125455705..7ce6d048e9b22319d70b8d2cfa2e7570fb52a7e4 100644
--- a/src/core/SkReadBuffer.h
+++ b/src/core/SkReadBuffer.h
@@ -152,14 +152,14 @@ public:
virtual bool readPointArray(SkPoint* points, size_t size);
virtual bool readScalarArray(SkScalar* values, size_t size);
- SkData* readByteArrayAsData() {
+ sk_sp<SkData> readByteArrayAsData() {
size_t len = this->getArrayCount();
if (!this->validateAvailable(len)) {
- return SkData::NewEmpty();
+ return SkData::MakeEmpty();
}
void* buffer = sk_malloc_throw(len);
this->readByteArray(buffer, len);
- return SkData::NewFromMalloc(buffer, len);
+ return SkData::MakeFromMalloc(buffer, len);
}
// helpers to get info about arrays and binary data
« no previous file with comments | « src/core/SkPixmap.cpp ('k') | src/core/SkReader32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698