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

Unified Diff: src/pdf/SkPDFDevice.h

Issue 1775043002: SkPDF: Add sk_sp setters; .release() becomes std::move() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix -Wpessimizing-move 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/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFDevice.h
diff --git a/src/pdf/SkPDFDevice.h b/src/pdf/SkPDFDevice.h
index 310807d86ec4e54c1525519c2e7959e9599cadc0..b1345a8e3fbb8e7c85069e62703d649486382d14 100644
--- a/src/pdf/SkPDFDevice.h
+++ b/src/pdf/SkPDFDevice.h
@@ -144,9 +144,8 @@ public:
// PDF specific methods.
- /** Create the resource dictionary for this device.
- */
- SkPDFDict* createResourceDict() const;
+ /** Create the resource dictionary for this device. */
+ sk_sp<SkPDFDict> makeResourceDict() const;
/** Get the fonts used on this device.
*/
@@ -164,15 +163,12 @@ public:
*/
void appendDestinations(SkPDFDict* dict, SkPDFObject* page) const;
- /** Returns a copy of the media box for this device. The caller is required
- * to unref() this when it is finished.
- */
- SkPDFArray* copyMediaBox() const;
+ /** Returns a copy of the media box for this device. */
+ sk_sp<SkPDFArray> copyMediaBox() const;
- /** Returns a SkStream with the page contents. The caller is responsible
- * for a deleting the returned value.
+ /** Returns a SkStream with the page contents.
*/
- SkStreamAsset* content() const;
+ skstd::unique_ptr<SkStreamAsset> content() const;
/** Writes the page contents to the stream. */
void writeContent(SkWStream*) const;
« no previous file with comments | « src/pdf/SkPDFBitmap.cpp ('k') | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698