Index: src/xps/SkDocument_XPS.cpp |
diff --git a/src/xps/SkDocument_XPS.cpp b/src/xps/SkDocument_XPS.cpp |
index 33edf789e4355fa56e3d9c1ded88f70f31b3aab0..e1222c92bc348ee195a3ccef9220ff17a0358e2c 100644 |
--- a/src/xps/SkDocument_XPS.cpp |
+++ b/src/xps/SkDocument_XPS.cpp |
@@ -65,18 +65,18 @@ private: |
/////////////////////////////////////////////////////////////////////////////// |
-SkDocument* SkDocument::CreateXPS(SkWStream* stream, SkScalar dpi) { |
- return stream ? new SkDocument_XPS(stream, nullptr, dpi) : nullptr; |
+sk_sp<SkDocument> SkDocument::MakeXPS(SkWStream* stream, SkScalar dpi) { |
+ return stream ? sk_make_sp<SkDocument_XPS>(stream, nullptr, dpi) : nullptr; |
} |
static void delete_wstream(SkWStream* stream, bool aborted) { delete stream; } |
-SkDocument* SkDocument::CreateXPS(const char path[], SkScalar dpi) { |
+sk_sp<SkDocument> SkDocument::MakeXPS(const char path[], SkScalar dpi) { |
SkAutoTDelete<SkFILEWStream> stream(new SkFILEWStream(path)); |
if (!stream->isValid()) { |
return nullptr; |
} |
- return new SkDocument_XPS(stream.release(), delete_wstream, dpi); |
+ return sk_make_sp<SkDocument_XPS>(stream.release(), delete_wstream, dpi); |
} |
#endif//defined(SK_BUILD_FOR_WIN32) |