diff options
author | halcanary <halcanary@google.com> | 2016-03-28 07:58:30 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-28 07:58:30 -0700 |
commit | b8fb9934a0707e8e5f9e725502974dc2d432a815 (patch) | |
tree | 22e7ed019133988da9adf37d539885ec96d65cad /src/pdf/SkPDFShader.cpp | |
parent | e50f3e75392d7be8ae89df8f55b1700100c34ad7 (diff) |
SkPDF s/SkAutoTDelete/std::unique_ptr/
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1837553002
Review URL: https://codereview.chromium.org/1837553002
Diffstat (limited to 'src/pdf/SkPDFShader.cpp')
-rw-r--r-- | src/pdf/SkPDFShader.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp index eaac84921c..ef47cf7e7b 100644 --- a/src/pdf/SkPDFShader.cpp +++ b/src/pdf/SkPDFShader.cpp @@ -488,7 +488,7 @@ SkPDFImageShader::~SkPDFImageShader() {} static SkPDFObject* get_pdf_shader_by_state( SkPDFDocument* doc, SkScalar dpi, - SkAutoTDelete<SkPDFShader::State>* autoState) { + std::unique_ptr<SkPDFShader::State>* autoState) { const SkPDFShader::State& state = **autoState; SkPDFCanon* canon = doc->canon(); if (state.fType == SkShader::kNone_GradientType && state.fImage.isNull()) { @@ -519,7 +519,7 @@ SkPDFObject* SkPDFShader::GetPDFShader(SkPDFDocument* doc, const SkMatrix& matrix, const SkIRect& surfaceBBox, SkScalar rasterScale) { - SkAutoTDelete<SkPDFShader::State> state(new State(shader, matrix, surfaceBBox, rasterScale)); + std::unique_ptr<SkPDFShader::State> state(new State(shader, matrix, surfaceBBox, rasterScale)); return get_pdf_shader_by_state(doc, dpi, &state); } @@ -585,12 +585,12 @@ static sk_sp<SkPDFObject> create_smask_graphic_state( SkRect bbox; bbox.set(state.fBBox); - SkAutoTDelete<SkPDFShader::State> alphaToLuminosityState( + std::unique_ptr<SkPDFShader::State> alphaToLuminosityState( state.CreateAlphaToLuminosityState()); sk_sp<SkPDFObject> luminosityShader( get_pdf_shader_by_state(doc, dpi, &alphaToLuminosityState)); - SkAutoTDelete<SkStream> alphaStream(create_pattern_fill_content(-1, bbox)); + std::unique_ptr<SkStream> alphaStream(create_pattern_fill_content(-1, bbox)); auto resources = get_gradient_resource_dict(luminosityShader.get(), nullptr); @@ -606,12 +606,12 @@ static sk_sp<SkPDFObject> create_smask_graphic_state( SkPDFAlphaFunctionShader* SkPDFAlphaFunctionShader::Create( SkPDFDocument* doc, SkScalar dpi, - SkAutoTDelete<SkPDFShader::State>* autoState) { + std::unique_ptr<SkPDFShader::State>* autoState) { const SkPDFShader::State& state = **autoState; SkRect bbox; bbox.set(state.fBBox); - SkAutoTDelete<SkPDFShader::State> opaqueState(state.CreateOpaqueState()); + std::unique_ptr<SkPDFShader::State> opaqueState(state.CreateOpaqueState()); sk_sp<SkPDFObject> colorShader( get_pdf_shader_by_state(doc, dpi, &opaqueState)); @@ -629,7 +629,7 @@ SkPDFAlphaFunctionShader* SkPDFAlphaFunctionShader::Create( auto resourceDict = get_gradient_resource_dict(colorShader.get(), alphaGs.get()); - SkAutoTDelete<SkStream> colorStream( + std::unique_ptr<SkStream> colorStream( create_pattern_fill_content(0, bbox)); alphaFunctionShader->setData(colorStream.get()); @@ -701,7 +701,7 @@ static sk_sp<SkPDFStream> make_ps_function( } SkPDFFunctionShader* SkPDFFunctionShader::Create( - SkPDFCanon* canon, SkAutoTDelete<SkPDFShader::State>* autoState) { + SkPDFCanon* canon, std::unique_ptr<SkPDFShader::State>* autoState) { const SkPDFShader::State& state = **autoState; void (*codeFunction)(const SkShader::GradientInfo& info, @@ -826,7 +826,7 @@ SkPDFFunctionShader* SkPDFFunctionShader::Create( SkPDFImageShader* SkPDFImageShader::Create( SkPDFDocument* doc, SkScalar dpi, - SkAutoTDelete<SkPDFShader::State>* autoState) { + std::unique_ptr<SkPDFShader::State>* autoState) { const SkPDFShader::State& state = **autoState; state.fImage.lockPixels(); |