aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/pdf
diff options
context:
space:
mode:
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/SkPDFDevice.cpp2
-rw-r--r--src/pdf/SkPDFFont.cpp2
-rw-r--r--src/pdf/SkPDFFormXObject.cpp4
-rw-r--r--src/pdf/SkPDFGraphicState.cpp2
-rw-r--r--src/pdf/SkPDFResourceDict.cpp2
-rw-r--r--src/pdf/SkPDFShader.cpp8
6 files changed, 10 insertions, 10 deletions
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()));