diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/doc/SkDocument_PDF.cpp | 6 | ||||
-rw-r--r-- | src/pdf/SkPDFDevice.cpp | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFFont.cpp | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFFormXObject.cpp | 4 | ||||
-rw-r--r-- | src/pdf/SkPDFGraphicState.cpp | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFResourceDict.cpp | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFShader.cpp | 8 |
7 files changed, 13 insertions, 13 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, diff --git a/src/pdf/SkPDFDevice.cpp b/src/pdf/SkPDFDevice.cpp index 9d593aa80a..744d42d25e 100644 --- a/src/pdf/SkPDFDevice.cpp +++ b/src/pdf/SkPDFDevice.cpp @@ -1711,7 +1711,7 @@ void SkPDFDevice::appendDestinations(SkPDFDict* dict, SkPDFObject* page) const { for (const NamedDestination& dest : fNamedDestinations) { auto pdfDest = sk_make_sp<SkPDFArray>(); pdfDest->reserve(5); - pdfDest->appendObjRef(sk_sp<SkPDFObject>(SkRef(page))); + pdfDest->appendObjRef(sk_ref_sp(page)); pdfDest->appendName("XYZ"); SkPoint p = fInitialTransform.mapXY(dest.point.x(), dest.point.y()); pdfDest->appendScalar(p.x()); diff --git a/src/pdf/SkPDFFont.cpp b/src/pdf/SkPDFFont.cpp index 4864c7c81c..59bfc8f3f1 100644 --- a/src/pdf/SkPDFFont.cpp +++ b/src/pdf/SkPDFFont.cpp @@ -1203,7 +1203,7 @@ SkPDFType1Font::~SkPDFType1Font() {} bool SkPDFType1Font::addFontDescriptor(int16_t defaultWidth) { if (SkPDFDict* descriptor = getFontDescriptor()) { this->insertObjRef("FontDescriptor", - sk_sp<SkPDFDict>(SkRef(descriptor))); + sk_ref_sp(descriptor)); return true; } diff --git a/src/pdf/SkPDFFormXObject.cpp b/src/pdf/SkPDFFormXObject.cpp index d565ab81e1..39d75a5a94 100644 --- a/src/pdf/SkPDFFormXObject.cpp +++ b/src/pdf/SkPDFFormXObject.cpp @@ -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", sk_sp<SkPDFDict>(SkRef(resourceDict))); - this->insertObject("BBox", sk_sp<SkPDFArray>(SkRef(bbox))); + this->insertObject("Resources", sk_ref_sp(resourceDict)); + this->insertObject("BBox", sk_ref_sp(bbox)); // Right now SkPDFFormXObject is only used for saveLayer, which implies // isolated blending. Do this conditionally if that changes. diff --git a/src/pdf/SkPDFGraphicState.cpp b/src/pdf/SkPDFGraphicState.cpp index 19e9a36d05..8fad7497c2 100644 --- a/src/pdf/SkPDFGraphicState.cpp +++ b/src/pdf/SkPDFGraphicState.cpp @@ -165,7 +165,7 @@ SkPDFDict* SkPDFGraphicState::GetSMaskGraphicState(SkPDFFormXObject* sMask, } else if (sMaskMode == kLuminosity_SMaskMode) { sMaskDict->insertName("S", "Luminosity"); } - sMaskDict->insertObjRef("G", sk_sp<SkPDFFormXObject>(SkRef(sMask))); + sMaskDict->insertObjRef("G", sk_ref_sp(sMask)); if (invert) { sMaskDict->insertObjRef("TR", make_invert_function()); } diff --git a/src/pdf/SkPDFResourceDict.cpp b/src/pdf/SkPDFResourceDict.cpp index c2144223b4..7891de8006 100644 --- a/src/pdf/SkPDFResourceDict.cpp +++ b/src/pdf/SkPDFResourceDict.cpp @@ -64,7 +64,7 @@ static void add_subdict( auto resources = sk_make_sp<SkPDFDict>(); for (int i = 0; i < resourceList.count(); i++) { resources->insertObjRef(SkPDFResourceDict::getResourceName(type, i), - sk_sp<SkPDFObject>(SkRef(resourceList[i]))); + sk_ref_sp(resourceList[i])); } dst->insertObject(get_resource_type_name(type), std::move(resources)); } diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp index d5f114ec0f..e30e43d4f8 100644 --- a/src/pdf/SkPDFShader.cpp +++ b/src/pdf/SkPDFShader.cpp @@ -552,7 +552,7 @@ static void populate_tiling_pattern_dict(SkPDFDict* pattern, pattern->insertObject("BBox", SkPDFUtils::RectToArray(bbox)); pattern->insertScalar("XStep", bbox.width()); pattern->insertScalar("YStep", bbox.height()); - pattern->insertObject("Resources", sk_sp<SkPDFDict>(SkRef(resources))); + pattern->insertObject("Resources", sk_ref_sp(resources)); if (!matrix.isIdentity()) { pattern->insertObject("Matrix", SkPDFUtils::MatrixToArray(matrix)); } @@ -697,8 +697,8 @@ static SkPDFStream* make_ps_function(const SkString& psCode, SkData::NewWithCopy(psCode.c_str(), psCode.size())); SkPDFStream* result = new SkPDFStream(funcData.get()); result->insertInt("FunctionType", 4); - result->insertObject("Domain", sk_sp<SkPDFObject>(SkRef(domain))); - result->insertObject("Range", sk_sp<SkPDFObject>(SkRef(rangeObject.get(create_range_object)))); + result->insertObject("Domain", sk_ref_sp(domain)); + result->insertObject("Range", sk_ref_sp(rangeObject.get(create_range_object))); return result; } @@ -802,7 +802,7 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create( auto pdfShader = sk_make_sp<SkPDFDict>(); pdfShader->insertInt("ShadingType", 1); pdfShader->insertName("ColorSpace", "DeviceRGB"); - pdfShader->insertObject("Domain", sk_sp<SkPDFObject>(SkRef(domain.get()))); + pdfShader->insertObject("Domain", sk_ref_sp(domain.get())); sk_sp<SkPDFStream> function( make_ps_function(functionCode, domain.get())); |