Index: src/core/SkColorFilterShader.cpp |
diff --git a/src/core/SkColorFilterShader.cpp b/src/core/SkColorFilterShader.cpp |
index 4ab232aa38dc515ea4c803a90449bf6ddf089410..6f9fc978191adcc7af1c56972e045f6dccd84af4 100644 |
--- a/src/core/SkColorFilterShader.cpp |
+++ b/src/core/SkColorFilterShader.cpp |
@@ -97,27 +97,25 @@ void SkColorFilterShader::FilterShaderContext::shadeSpan4f(int x, int y, SkPM4f |
#if SK_SUPPORT_GPU |
///////////////////////////////////////////////////////////////////// |
-const GrFragmentProcessor* SkColorFilterShader::asFragmentProcessor( |
+sk_sp<GrFragmentProcessor> SkColorFilterShader::asFragmentProcessor( |
GrContext* context, |
const SkMatrix& viewM, |
const SkMatrix* localMatrix, |
SkFilterQuality fq, |
SkSourceGammaTreatment gammaTreatment) const { |
- SkAutoTUnref<const GrFragmentProcessor> fp1(fShader->asFragmentProcessor(context, viewM, |
- localMatrix, fq, |
- gammaTreatment)); |
- if (!fp1.get()) { |
+ sk_sp<GrFragmentProcessor> fp1(fShader->asFragmentProcessor(context, viewM, localMatrix, fq, |
+ gammaTreatment)); |
+ if (!fp1) { |
return nullptr; |
} |
- SkAutoTUnref<const GrFragmentProcessor> fp2(fFilter->asFragmentProcessor(context)); |
- if (!fp2.get()) { |
- return fp1.release(); |
+ sk_sp<GrFragmentProcessor> fp2(fFilter->asFragmentProcessor(context)); |
+ if (!fp2) { |
+ return fp1; |
} |
- const GrFragmentProcessor* fpSeries[] = { fp1.get(), fp2.get() }; |
- |
+ sk_sp<GrFragmentProcessor> fpSeries[] = { std::move(fp1), std::move(fp2) }; |
return GrFragmentProcessor::RunInSeries(fpSeries, 2); |
} |
#endif |