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

Unified Diff: src/xps/SkDocument_XPS.cpp

Issue 1916093002: SkDocument/PDF: new API (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-04-26 (Tuesday) 15:55:33 EDT Created 4 years, 8 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/pdf/SkPDFMetadata.cpp ('k') | src/xps/SkDocument_XPS_None.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
« no previous file with comments | « src/pdf/SkPDFMetadata.cpp ('k') | src/xps/SkDocument_XPS_None.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698