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

Unified Diff: src/pdf/SkPDFFormXObject.cpp

Issue 1775143002: Revert of SkPDF: Add sk_sp setters; .release() becomes std::move() (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/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFGraphicState.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFFormXObject.cpp
diff --git a/src/pdf/SkPDFFormXObject.cpp b/src/pdf/SkPDFFormXObject.cpp
index d565ab81e115664a11813752d63c688f7b8c0726..abf331f5444fc10de8e1c9c8ecccc9b483445a56 100644
--- a/src/pdf/SkPDFFormXObject.cpp
+++ b/src/pdf/SkPDFFormXObject.cpp
@@ -19,9 +19,9 @@
// We don't want to keep around device because we'd have two copies
// of content, so reference or copy everything we need (content and
// resources).
- auto resourceDict = device->makeResourceDict();
+ sk_sp<SkPDFDict> resourceDict(device->createResourceDict());
- auto content = device->content();
+ SkAutoTDelete<SkStreamAsset> content(device->content());
this->setData(content.get());
sk_sp<SkPDFArray> bboxArray(device->copyMediaBox());
@@ -60,8 +60,8 @@
SkPDFDict* resourceDict, SkPDFArray* bbox) {
this->insertName("Type", "XObject");
this->insertName("Subtype", "Form");
- this->insertObject("Resources", sk_sp<SkPDFDict>(SkRef(resourceDict)));
- this->insertObject("BBox", sk_sp<SkPDFArray>(SkRef(bbox)));
+ this->insertObject("Resources", SkRef(resourceDict));
+ this->insertObject("BBox", SkRef(bbox));
// Right now SkPDFFormXObject is only used for saveLayer, which implies
// isolated blending. Do this conditionally if that changes.
@@ -72,7 +72,7 @@
group->insertName("CS", colorSpace);
}
group->insertBool("I", true); // Isolated.
- this->insertObject("Group", std::move(group));
+ this->insertObject("Group", group.release());
}
SkPDFFormXObject::~SkPDFFormXObject() {}
« no previous file with comments | « src/pdf/SkPDFFont.cpp ('k') | src/pdf/SkPDFGraphicState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698