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

Unified Diff: src/core/SkPixmap.cpp

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/SkPictureRecord.h ('k') | src/core/SkReadBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixmap.cpp
diff --git a/src/core/SkPixmap.cpp b/src/core/SkPixmap.cpp
index 57bb194258d5f2bdc7b6eb1953c2108d565eaf2b..5f3c3a086a7efa68ae54fea2591edcf36f339d59 100644
--- a/src/core/SkPixmap.cpp
+++ b/src/core/SkPixmap.cpp
@@ -315,9 +315,9 @@ const SkData* SkAutoPixmapStorage::detachPixelsAsData() {
return nullptr;
}
- const SkData* data = SkData::NewFromMalloc(fStorage, this->getSafeSize());
+ auto data = SkData::MakeFromMalloc(fStorage, this->getSafeSize());
fStorage = nullptr;
this->INHERITED::reset();
- return data;
+ return data.release();
}
« no previous file with comments | « src/core/SkPictureRecord.h ('k') | src/core/SkReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698