diff options
author | halcanary <halcanary@google.com> | 2016-03-09 07:52:09 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-09 07:52:10 -0800 |
commit | e94ea625fbce6979b7ef59255c7598e81d37f546 (patch) | |
tree | 0eb1271f4a09606ec10a51f1f42fc733a67bad85 /src/doc | |
parent | 51190df040c5a81bb82b9cd5b95f07a39d0e602b (diff) |
SkPDF: use sk_ref_sp
s/sk_sp<[^>]*>(SkRef(\([^)]*\)))/sk_ref_sp(\1)/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1777923002
Review URL: https://codereview.chromium.org/1777923002
Diffstat (limited to 'src/doc')
-rw-r--r-- | src/doc/SkDocument_PDF.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/doc/SkDocument_PDF.cpp b/src/doc/SkDocument_PDF.cpp index 1cc4ffaca9..c866648ae7 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, |