Index: src/core/SkComposeShader.cpp |
diff --git a/src/core/SkComposeShader.cpp b/src/core/SkComposeShader.cpp |
index 13569f1b48d9d0d44c04b726e606fa4736c352aa..e9f3f4c6180f5f6ac6547fd9c2c4d7eae0350c69 100644 |
--- a/src/core/SkComposeShader.cpp |
+++ b/src/core/SkComposeShader.cpp |
@@ -183,7 +183,7 @@ void SkComposeShader::ComposeShaderContext::shadeSpan(int x, int y, SkPMColor re |
///////////////////////////////////////////////////////////////////// |
-const GrFragmentProcessor* SkComposeShader::asFragmentProcessor( |
+sk_sp<GrFragmentProcessor> SkComposeShader::asFragmentProcessor( |
GrContext* context, |
const SkMatrix& viewM, |
const SkMatrix* localMatrix, |
@@ -197,8 +197,8 @@ const GrFragmentProcessor* SkComposeShader::asFragmentProcessor( |
switch (mode) { |
case SkXfermode::kClear_Mode: |
- return GrConstColorProcessor::Create(GrColor_TRANSPARENT_BLACK, |
- GrConstColorProcessor::kIgnore_InputMode); |
+ return GrConstColorProcessor::Make(GrColor_TRANSPARENT_BLACK, |
+ GrConstColorProcessor::kIgnore_InputMode); |
break; |
case SkXfermode::kSrc_Mode: |
return fShaderB->asFragmentProcessor(context, viewM, localMatrix, fq, gammaTreatment); |
@@ -207,17 +207,18 @@ const GrFragmentProcessor* SkComposeShader::asFragmentProcessor( |
return fShaderA->asFragmentProcessor(context, viewM, localMatrix, fq, gammaTreatment); |
break; |
default: |
- SkAutoTUnref<const GrFragmentProcessor> fpA(fShaderA->asFragmentProcessor(context, |
- viewM, localMatrix, fq, gammaTreatment)); |
- if (!fpA.get()) { |
+ sk_sp<GrFragmentProcessor> fpA(fShaderA->asFragmentProcessor(context, |
+ viewM, localMatrix, fq, gammaTreatment)); |
+ if (!fpA) { |
return nullptr; |
} |
- SkAutoTUnref<const GrFragmentProcessor> fpB(fShaderB->asFragmentProcessor(context, |
- viewM, localMatrix, fq, gammaTreatment)); |
- if (!fpB.get()) { |
+ sk_sp<GrFragmentProcessor> fpB(fShaderB->asFragmentProcessor(context, |
+ viewM, localMatrix, fq, gammaTreatment)); |
+ if (!fpB) { |
return nullptr; |
} |
- return GrXfermodeFragmentProcessor::CreateFromTwoProcessors(fpB, fpA, mode); |
+ return GrXfermodeFragmentProcessor::MakeFromTwoProcessors(std::move(fpB), |
+ std::move(fpA), mode); |
} |
} |
#endif |