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

Unified Diff: src/pdf/SkPDFResourceDict.cpp

Issue 1772493002: SkPDF: AutoTUnref<T> changes in use (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/SkPDFMetadata.cpp ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFResourceDict.cpp
diff --git a/src/pdf/SkPDFResourceDict.cpp b/src/pdf/SkPDFResourceDict.cpp
index 2f9abca8b6926fdb126296efda406f060de9d415..b72e6667fd608c35e1e9d40a93f50f1658d2d721 100644
--- a/src/pdf/SkPDFResourceDict.cpp
+++ b/src/pdf/SkPDFResourceDict.cpp
@@ -66,7 +66,7 @@ static void add_subdict(
resources->insertObjRef(SkPDFResourceDict::getResourceName(type, i),
SkRef(resourceList[i]));
}
- dst->insertObject(get_resource_type_name(type), resources.detach());
+ dst->insertObject(get_resource_type_name(type), resources.release());
}
SkPDFDict* SkPDFResourceDict::Create(
@@ -83,19 +83,19 @@ SkPDFDict* SkPDFResourceDict::Create(
for (size_t i = 0; i < SK_ARRAY_COUNT(kProcs); i++) {
procSets->appendName(kProcs[i]);
}
- dict->insertObject("ProcSets", procSets.detach());
+ dict->insertObject("ProcSets", procSets.release());
if (gStateResources) {
- add_subdict(*gStateResources, kExtGState_ResourceType, dict);
+ add_subdict(*gStateResources, kExtGState_ResourceType, dict.get());
}
if (patternResources) {
- add_subdict(*patternResources, kPattern_ResourceType, dict);
+ add_subdict(*patternResources, kPattern_ResourceType, dict.get());
}
if (xObjectResources) {
- add_subdict(*xObjectResources, kXObject_ResourceType, dict);
+ add_subdict(*xObjectResources, kXObject_ResourceType, dict.get());
}
if (fontResources) {
- add_subdict(*fontResources, kFont_ResourceType, dict);
+ add_subdict(*fontResources, kFont_ResourceType, dict.get());
}
- return dict.detach();
+ return dict.release();
}
« no previous file with comments | « src/pdf/SkPDFMetadata.cpp ('k') | src/pdf/SkPDFShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698