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

Unified Diff: src/doc/SkDocument_PDF.cpp

Issue 1777923002: SkPDF: use sk_ref_sp (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 | « no previous file | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/doc/SkDocument_PDF.cpp
diff --git a/src/doc/SkDocument_PDF.cpp b/src/doc/SkDocument_PDF.cpp
index 1cc4ffaca9520b8839a1ebfe50e6f376081fcef0..c866648ae7fecae8cbc020cfd0b997aac4c289fa 100644
--- a/src/doc/SkDocument_PDF.cpp
+++ b/src/doc/SkDocument_PDF.cpp
@@ -37,7 +37,7 @@ static void emit_pdf_footer(SkWStream* stream,
// TODO(http://crbug.com/80908): Linearized format will take a
// Prev entry too.
trailerDict.insertInt("Size", int(objCount));
- trailerDict.insertObjRef("Root", sk_sp<SkPDFObject>(SkRef(docCatalog)));
+ trailerDict.insertObjRef("Root", sk_ref_sp(docCatalog));
SkASSERT(info);
trailerDict.insertObjRef("Info", std::move(info));
if (id) {
@@ -125,7 +125,7 @@ static sk_sp<SkPDFDict> generate_page_tree(
int count = 0;
for (; i < curNodes.count() && count < kNodeSize; i++, count++) {
curNodes[i]->insertObjRef("Parent", newNode);
- kids->appendObjRef(sk_sp<SkPDFDict>(SkRef(curNodes[i])));
+ kids->appendObjRef(sk_ref_sp(curNodes[i]));
// TODO(vandebo): put the objects in strict access order.
// Probably doesn't matter because they are so small.
@@ -158,7 +158,7 @@ static sk_sp<SkPDFDict> generate_page_tree(
} while (curNodes.count() > 1);
pageTree->push(curNodes[0]); // Transfer reference.
- return sk_sp<SkPDFDict>(SkRef(curNodes[0]));
+ return sk_ref_sp(curNodes[0]);
}
static bool emit_pdf_document(const SkTArray<sk_sp<const SkPDFDevice>>& pageDevices,
« no previous file with comments | « no previous file | src/pdf/SkPDFDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698