Index: src/pdf/SkPDFShader.cpp |
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp |
index 8d5ee5a753697450285b73851c96e59612a3c324..95ef9dcca0b90215b05fe38e6251cb658665a735 100644 |
--- a/src/pdf/SkPDFShader.cpp |
+++ b/src/pdf/SkPDFShader.cpp |
@@ -771,7 +771,7 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create( |
return nullptr; |
} |
- sk_sp<SkPDFArray> domain(new SkPDFArray); |
+ auto domain = sk_make_sp<SkPDFArray>(); |
domain->reserve(4); |
domain->appendScalar(bbox.fLeft); |
domain->appendScalar(bbox.fRight); |
@@ -799,7 +799,7 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create( |
functionCode = codeFunction(*info, perspectiveInverseOnly); |
} |
- sk_sp<SkPDFDict> pdfShader(new SkPDFDict); |
+ auto pdfShader = sk_make_sp<SkPDFDict>(); |
pdfShader->insertInt("ShadingType", 1); |
pdfShader->insertName("ColorSpace", "DeviceRGB"); |
pdfShader->insertObject("Domain", SkRef(domain.get())); |
@@ -808,8 +808,8 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create( |
make_ps_function(functionCode, domain.get())); |
pdfShader->insertObjRef("Function", function.release()); |
- sk_sp<SkPDFFunctionShader> pdfFunctionShader(new SkPDFFunctionShader(autoState->detach())); |
- |
+ sk_sp<SkPDFFunctionShader> pdfFunctionShader( |
+ new SkPDFFunctionShader(autoState->detach())); |
pdfFunctionShader->insertInt("PatternType", 2); |
pdfFunctionShader->insertObject("Matrix", |
SkPDFUtils::MatrixToArray(finalMatrix)); |