Index: src/pdf/SkPDFResourceDict.cpp |
diff --git a/src/pdf/SkPDFResourceDict.cpp b/src/pdf/SkPDFResourceDict.cpp |
index d3f4a6d53347d29c36518e0c18cfd105f86cad23..c2144223b462ae45e07ea26eefab42b4377be3b0 100644 |
--- a/src/pdf/SkPDFResourceDict.cpp |
+++ b/src/pdf/SkPDFResourceDict.cpp |
@@ -64,12 +64,12 @@ static void add_subdict( |
auto resources = sk_make_sp<SkPDFDict>(); |
for (int i = 0; i < resourceList.count(); i++) { |
resources->insertObjRef(SkPDFResourceDict::getResourceName(type, i), |
- SkRef(resourceList[i])); |
+ sk_sp<SkPDFObject>(SkRef(resourceList[i]))); |
} |
- dst->insertObject(get_resource_type_name(type), resources.release()); |
+ dst->insertObject(get_resource_type_name(type), std::move(resources)); |
} |
-SkPDFDict* SkPDFResourceDict::Create( |
+sk_sp<SkPDFDict> SkPDFResourceDict::Make( |
const SkTDArray<SkPDFObject*>* gStateResources, |
const SkTDArray<SkPDFObject*>* patternResources, |
const SkTDArray<SkPDFObject*>* xObjectResources, |
@@ -83,7 +83,7 @@ SkPDFDict* SkPDFResourceDict::Create( |
for (size_t i = 0; i < SK_ARRAY_COUNT(kProcs); i++) { |
procSets->appendName(kProcs[i]); |
} |
- dict->insertObject("ProcSets", procSets.release()); |
+ dict->insertObject("ProcSets", std::move(procSets)); |
if (gStateResources) { |
add_subdict(*gStateResources, kExtGState_ResourceType, dict.get()); |
@@ -97,5 +97,5 @@ SkPDFDict* SkPDFResourceDict::Create( |
if (fontResources) { |
add_subdict(*fontResources, kFont_ResourceType, dict.get()); |
} |
- return dict.release(); |
+ return dict; |
} |