Index: gm/yuvtorgbeffect.cpp |
diff --git a/gm/yuvtorgbeffect.cpp b/gm/yuvtorgbeffect.cpp |
index ca39c6c1884b56dcb62100e91b9343266d53b7ed..7fc8ff411bbbed51f4cfc55866871964a1fc954e 100644 |
--- a/gm/yuvtorgbeffect.cpp |
+++ b/gm/yuvtorgbeffect.cpp |
@@ -114,18 +114,17 @@ protected: |
for (int i = 0; i < 6; ++i) { |
GrPipelineBuilder pipelineBuilder; |
- pipelineBuilder.setXPFactory( |
- GrPorterDuffXPFactory::Create(SkXfermode::kSrc_Mode))->unref(); |
- SkAutoTUnref<const GrFragmentProcessor> fp( |
- GrYUVEffect::CreateYUVToRGB(texture[indices[i][0]], |
- texture[indices[i][1]], |
- texture[indices[i][2]], |
- sizes, |
- static_cast<SkYUVColorSpace>(space))); |
+ pipelineBuilder.setXPFactory(GrPorterDuffXPFactory::Make(SkXfermode::kSrc_Mode)); |
+ sk_sp<GrFragmentProcessor> fp( |
+ GrYUVEffect::MakeYUVToRGB(texture[indices[i][0]], |
+ texture[indices[i][1]], |
+ texture[indices[i][2]], |
+ sizes, |
+ static_cast<SkYUVColorSpace>(space))); |
if (fp) { |
SkMatrix viewMatrix; |
viewMatrix.setTranslate(x, y); |
- pipelineBuilder.addColorFragmentProcessor(fp); |
+ pipelineBuilder.addColorFragmentProcessor(std::move(fp)); |
SkAutoTUnref<GrDrawBatch> batch( |
GrRectBatchFactory::CreateNonAAFill(GrColor_WHITE, viewMatrix, |
renderRect, nullptr, nullptr)); |