Make sp variants for SkData
Review URL: https://codereview.chromium.org/1779263003
diff --git a/src/core/SkPictureRecord.h b/src/core/SkPictureRecord.h
index 607f6f1..089bc81 100644
--- a/src/core/SkPictureRecord.h
+++ b/src/core/SkPictureRecord.h
@@ -43,15 +43,15 @@
return fImageRefs;
}
- SkData* opData(bool deepCopy) const {
+ sk_sp<SkData> opData(bool deepCopy) const {
this->validate(fWriter.bytesWritten(), 0);
if (fWriter.bytesWritten() == 0) {
- return SkData::NewEmpty();
+ return SkData::MakeEmpty();
}
if (deepCopy) {
- return SkData::NewWithCopy(fWriter.contiguousArray(), fWriter.bytesWritten());
+ return SkData::MakeWithCopy(fWriter.contiguousArray(), fWriter.bytesWritten());
}
return fWriter.snapshotAsData();