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

Unified Diff: src/pdf/SkPDFShader.cpp

Issue 1772493002: SkPDF: AutoTUnref<T> changes in use (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 | « src/pdf/SkPDFResourceDict.cpp ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pdf/SkPDFShader.cpp
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index fe6e47c1db0f049307969097919a9426c72788c8..56926f3e6f512425f255846d2f8f29dc00c21f3b 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -593,7 +593,7 @@ static SkPDFObject* create_smask_graphic_state(
SkAutoTDelete<SkStream> alphaStream(create_pattern_fill_content(-1, bbox));
SkAutoTUnref<SkPDFDict>
- resources(get_gradient_resource_dict(luminosityShader, nullptr));
+ resources(get_gradient_resource_dict(luminosityShader.get(), nullptr));
SkAutoTUnref<SkPDFFormXObject> alphaMask(
new SkPDFFormXObject(alphaStream.get(), bbox, resources.get()));
@@ -806,17 +806,17 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create(
SkAutoTUnref<SkPDFStream> function(
make_ps_function(functionCode, domain.get()));
- pdfShader->insertObjRef("Function", function.detach());
+ pdfShader->insertObjRef("Function", function.release());
- SkPDFFunctionShader* pdfFunctionShader = new SkPDFFunctionShader(autoState->detach());
+ SkAutoTUnref<SkPDFFunctionShader> pdfFunctionShader(new SkPDFFunctionShader(autoState->detach()));
pdfFunctionShader->insertInt("PatternType", 2);
pdfFunctionShader->insertObject("Matrix",
SkPDFUtils::MatrixToArray(finalMatrix));
- pdfFunctionShader->insertObject("Shading", pdfShader.detach());
+ pdfFunctionShader->insertObject("Shading", pdfShader.release());
- canon->addFunctionShader(pdfFunctionShader);
- return pdfFunctionShader;
+ canon->addFunctionShader(pdfFunctionShader.get());
+ return pdfFunctionShader.release();
}
SkPDFImageShader* SkPDFImageShader::Create(
« no previous file with comments | « src/pdf/SkPDFResourceDict.cpp ('k') | src/pdf/SkPDFTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698