Index: src/pdf/SkPDFFormXObject.cpp |
diff --git a/src/pdf/SkPDFFormXObject.cpp b/src/pdf/SkPDFFormXObject.cpp |
index abf331f5444fc10de8e1c9c8ecccc9b483445a56..d565ab81e115664a11813752d63c688f7b8c0726 100644 |
--- a/src/pdf/SkPDFFormXObject.cpp |
+++ b/src/pdf/SkPDFFormXObject.cpp |
@@ -19,9 +19,9 @@ SkPDFFormXObject::SkPDFFormXObject(SkPDFDevice* device) { |
// 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). |
- sk_sp<SkPDFDict> resourceDict(device->createResourceDict()); |
+ auto resourceDict = device->makeResourceDict(); |
- SkAutoTDelete<SkStreamAsset> content(device->content()); |
+ auto content = device->content(); |
this->setData(content.get()); |
sk_sp<SkPDFArray> bboxArray(device->copyMediaBox()); |
@@ -60,8 +60,8 @@ void SkPDFFormXObject::init(const char* colorSpace, |
SkPDFDict* resourceDict, SkPDFArray* bbox) { |
this->insertName("Type", "XObject"); |
this->insertName("Subtype", "Form"); |
- this->insertObject("Resources", SkRef(resourceDict)); |
- this->insertObject("BBox", SkRef(bbox)); |
+ this->insertObject("Resources", sk_sp<SkPDFDict>(SkRef(resourceDict))); |
+ this->insertObject("BBox", sk_sp<SkPDFArray>(SkRef(bbox))); |
// Right now SkPDFFormXObject is only used for saveLayer, which implies |
// isolated blending. Do this conditionally if that changes. |
@@ -72,7 +72,7 @@ void SkPDFFormXObject::init(const char* colorSpace, |
group->insertName("CS", colorSpace); |
} |
group->insertBool("I", true); // Isolated. |
- this->insertObject("Group", group.release()); |
+ this->insertObject("Group", std::move(group)); |
} |
SkPDFFormXObject::~SkPDFFormXObject() {} |